为什么会出现下面的现象??
Ccode 2004-09-21 11:21:50 char lpImagePath[MAX_PATH],lpImageCurrentSoftPath[10][MAX_PATH],lpImageSoftPath1[10][MAX_PATH];
DWORD dwErrorCode;
int flag;
GetCurrentDirectory(MAX_PATH,lpImagePath);
printf("%s\n",lpImagePath);
sprintf(lpImageCurrentSoftPath[0],"vv.exe");
sprintf(lpImageCurrentSoftPath[1],"wwww.ini");
sprintf(lpImageCurrentSoftPath[2],"test.ini");
sprintf(lpImageCurrentSoftPath[3],"tt.exe");
sprintf(lpImageCurrentSoftPath[4],"eee.exe");
for(int i=0;i<1;i++)
{
strcat(lpImageSoftPath1[0],lpImagePath);
strcat(lpImageSoftPath1[1],lpImagePath);
strcat(lpImageSoftPath1[2],lpImagePath);
strcat(lpImageSoftPath1[3],lpImagePath);
strcat(lpImageSoftPath1[4],lpImagePath);
flag=i;
switch(flag)
{
case 0:
strcat(lpImageSoftPath1[0],"\\config\\config.exe");
printf("%s",lpImageSoftPath1[0]);
strcat(lpImageSoftPath1[1],"\\config\\aa.ini");
strcat(lpImageSoftPath1[2],"\\config\\user.ini");
strcat(lpImageSoftPath1[3],"\\config\\test.exe");
strcat(lpImageSoftPath1[4],"\\config\\gogo.txt");
break;
运行到flag=0的时候
lpImageSoftPath1[0]-lpImageSoftPath1[4]的路径都出现了问题,如:半C:\WINNT\system32\config\config.exe 而不是C:\WINNT\system32\config\config.exe,如何改进呢?