Question

Like in win32 C++ we use to use following code if needed to add multiple files as file_name0.txt, filename1.txt, ...., filename30.txt etc.

char fname[20];
for i = 0 -> 30 {
sprintf(fname, "filename%d.txt", i);
}

How can we do the same with TChar since I need to read multiple files in this case too

thanks Kashan

Was it helpful?

Solution

_stprintf( fname, TEXT("filename%d.txt"), i);

You will need to define fname as a tchar.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top