본문 바로가기

Programming/C++, MFC

Error。Expression: ("Buffer too small", 0)

728x90
반응형

 

// 변경 전
CStringA sPath(cPath); // char cPath[MAX_PATH];
sPath.Format("%s\\*.*", sPath);
strcpy(cPath, sPath);

// 변경 후
CStringA sPath1(pPath); // char cPath[MAX_PATH];
CStringA sPath2;
sPath2.Format("%s\\*.*", sPath1);
strcpy(pPath, sPath2);
728x90
반응형