Original Post
With C++ and SDL I'm having a bit of a brain fart remembering and finding the syntax for what I'm trying to do. I have a for loop in a function that is loading files into an array. (char* file, int number) are the two parameters of the function where file is the first part of the file name and number is the number of files. I have the files named as such:
example0.png
example1.png
example2.png
The code for the for loop is as follows:
OnLoad is a function I have for loading files which works independently of this. My question is when I pass the parameters "example" and "3" to the function and thus this for loop how do I have the above translate it into "example0.png" and so on.
example0.png
example1.png
example2.png
The code for the for loop is as follows:
for (int i = 0; i < number; i++)
{
Array = OnLoad((file) + i + ".png") ;
}OnLoad is a function I have for loading files which works independently of this. My question is when I pass the parameters "example" and "3" to the function and thus this for loop how do I have the above translate it into "example0.png" and so on.