65,210
社区成员
发帖
与我相关
我的任务
分享
void M1()
{
char* w1 = "URLDownl";
w1 = strcat(w1,"oadTo");
w1 = strcat(w1,"File");
w1 = strcat(w1,"A");
}
void M2()
{
char* w1 = "URL";
w1 = strcat(w1,"DownloadTo");
w1 = strcat(w1,"File");
w1 = strcat(w1,"A");
}
void M3()
{
char* w1 = "URL";
w1 = strcat(w1,"Download");
w1 = strcat(w1,"ToFile");
w1 = strcat(w1,"A");
}
#include<iostream>
using namespace std;
void M1()
{
char w[20] = "URLDownl";
char *w1=w;
w1 = strcat(w1,"oadTo");
w1 = strcat(w1,"File");
w1 = strcat(w1,"A");
cout<<w<<endl;
}
void M2()
{
char w[20] = "URL";
char *w1=w;
w1 = strcat(w1,"DownloadTo");
w1 = strcat(w1,"File");
w1 = strcat(w1,"A");
cout<<w<<endl;
}
void M3()
{
char w[20] = "URL";
char *w1=w;
w1 = strcat(w1,"Download");
w1 = strcat(w1,"ToFile");
w1 = strcat(w1,"A");
cout<<w<<endl;
}
int main(){
M1();
M2();
M3();
system("pause");
return 0;
}
char* w1 = "URL";
w1 = strcat(w1,"Download");
w1 = strcat(w1,"ToFile");
w1 = strcat(w1,"A");
::MessageBox(NULL,w1,NULL,NULL);
// 结果 URLDownloadToFileA
char* w2 = "URL";
w2 = strcat(w2,"DownloadTo");
w2 = strcat(w2,"File");
w2 = strcat(w2,"A");
::MessageBox(NULL,w2,NULL,NULL);
// 结果 URLDownloadToFileAoownloadToFileAoFileAoooownloadToFileAoFileAooo