请教一下C++打印数组内容出现“烫烫烫烫 如何解决
#include<iostream>#include<string.h>
using namespace std;
int main()
{
char filename; filename = '\0';
int i = 0;
char charr;
charr = (char)(i + 97);
charr = ' ';
strcpy_s(filename, "./dir/");
strcat_s(filename, charr);
strcat_s(filename, ".txt");
cout << filename << endl;
return 0;
}
输出结果是这样的:./dir/a 烫烫烫烫烫.txt该怎么改呢 char charr;
charr = (char)(i + 97);
charr = ' ';
charr='\0';
页:
[1]