Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
就像在 win32 C++ 中一样,如果需要添加多个文件,例如 file_name0.txt、filename1.txt、...、filename30.txt 等,我们会使用以下代码。
char fname[20]; for i = 0 -> 30 { sprintf(fname, "filename%d.txt", i); }
我们如何对TChar做同样的事情,因为在这种情况下我也需要读取多个文件
谢谢卡山
_stprintf( fname, TEXT("filename%d.txt"), i);
您需要将 fname 定义为 tchar。