Вопрос

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

Это было полезно?

Решение

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

You will need to define fname as a tchar.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top