帮我看看这个有什么问题?打印出来全是乱码。
#include "stdafx.h"
#include <stdio.h>
#include <string>
#include <stdlib.h>
#include <ctype.h>
int main(int argc, char* argv[])
{
char szStr[100],chStr1[100],chStr8[100]="*";
fflush(stdin);
gets(szStr);
if (chStr1!='\0')
strcat(chStr1,chStr8);
puts(chStr1);
return 0;
}
//我想要实现的是:输入的数字字符串szStr与chStr8进行拼接。这个前提是数字字符串szStr不为空的时候进行拼接。为空时不执行拼接命令。