Variables for creating a 5x5 box
If you have to print a 5x5 box with the a different image or the same you could do something like this. It loops though all the positions that you need and assigns it to a new sprite created. It is more maintaineable, cleaner and easy to read than declaring 25 variables, and it has fewer lines of code.

// Construct the vector with the specified size.
Vec2 size(5, 5);
std::vector&lt;Vec2&gt; positions(size.x * size.y);

// Push back desired positions (you could use C++11 initializer lists or a loop).
// Positions needs to be declared in the same order as the sprites will be
// added with "this-&gt;addChild".
positions.push_back(position);
...

float scale(0.5);

// Loop trought the vector and assign values
for (int i = 0; i &lt; size.x * size.y; i++) {
    auto sprite = Sprite::create("theimageyouneed.png");
    sprite-&gt;setPosition(positions[i]);
    sprite-&gt;setScale(scale);
    this-&gt;addChild(sprite, 0);
}