Frage

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

War es hilfreich?

Lösung

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

You will need to define fname as a tchar.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top