How I can do something like this in C++:
void my_print(format_string) {
vector<string> data;
//Fills vector
printf(format_string, data);
}
my_print("%1$s - %2$s - %3$s");
my_print("%3$s - %2$s);
I have not explained well before. The format string is entered by the application user.
In C# this works:
void my_print(format_string) {
List<string> data = new List<string>();
//Fills list
Console.WriteLine(format_string, data.ToArray);
}
my_print("{0} - {1} - {2}");
my_print("{2} - {1}");