用fopen()fread()读txt文件乱码,这是怎么回事?
caseIDOK:{FILE*fb=fopen("C:/Users/Administrator/Desktop/sss.txt","r");TCHARlines[256]...
case IDOK:
{
FILE* fb = fopen("C:/Users/Administrator/Desktop/sss.txt","r");
TCHAR lines[256];
fread(lines,sizeof(lines),1,fb);
fclose(fb);
SetDlgItemText(hwndDlg,IDC_EDIT1,lines);
}break; 展开
{
FILE* fb = fopen("C:/Users/Administrator/Desktop/sss.txt","r");
TCHAR lines[256];
fread(lines,sizeof(lines),1,fb);
fclose(fb);
SetDlgItemText(hwndDlg,IDC_EDIT1,lines);
}break; 展开
若以下回答无法解决问题,邀请你更新回答
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询