Click here to Skip to main content
15,899,314 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CButton Class Pin
Alan Balkany23-Sep-08 5:10
Alan Balkany23-Sep-08 5:10 
AnswerRe: CButton Class Pin
Hamid_RT22-Sep-08 18:58
Hamid_RT22-Sep-08 18:58 
GeneralRe: CButton Class Pin
Dhiraj kumar Saini22-Sep-08 19:30
Dhiraj kumar Saini22-Sep-08 19:30 
QuestionMake a setup of MFC(VC++) in visual studio 6? Pin
m_mun22-Sep-08 2:36
m_mun22-Sep-08 2:36 
QuestionRe: Make a setup of MFC(VC++) in visual studio 6? Pin
David Crow22-Sep-08 3:01
David Crow22-Sep-08 3:01 
AnswerRe: Make a setup of MFC(VC++) in visual studio 6? Pin
enhzflep22-Sep-08 3:17
enhzflep22-Sep-08 3:17 
AnswerRe: Make a setup of MFC(VC++) in visual studio 6? Pin
Hamid_RT22-Sep-08 19:00
Hamid_RT22-Sep-08 19:00 
QuestionWhat is wrong in this strcpy()? Pin
Member 550287922-Sep-08 1:14
Member 550287922-Sep-08 1:14 
What is wrong in this strcpy()?
I tried this function call, no compile time errors, but results in error during runtime.
What could be the problem in that function call?

char *s= "TEST";
char *s1= NULL;

char * s_cpy(char * s,char * s1)
{
char * p=(char*) malloc(strlen(s));
p=s;
printf("%s\n",p); // prints TEST
printf("%s\n",s1); // prints <null>
printf("%s\n",s); // prints TEST
strcpy(s1,p); //error, test.exe has encountered a problem
return s1;
}
AnswerRe: What is wrong in this strcpy()? Pin
Rajesh R Subramanian22-Sep-08 1:27
professionalRajesh R Subramanian22-Sep-08 1:27 
GeneralRe: What is wrong in this strcpy()? Pin
Member 550287922-Sep-08 1:33
Member 550287922-Sep-08 1:33 
AnswerRe: What is wrong in this strcpy()? Pin
Malli_S22-Sep-08 1:33
Malli_S22-Sep-08 1:33 
GeneralRe: What is wrong in this strcpy()? Pin
Member 550287922-Sep-08 1:50
Member 550287922-Sep-08 1:50 
GeneralRe: What is wrong in this strcpy()? Pin
Malli_S22-Sep-08 1:52
Malli_S22-Sep-08 1:52 
AnswerRe: What is wrong in this strcpy()? Pin
CPallini22-Sep-08 1:43
mveCPallini22-Sep-08 1:43 
AnswerRe: What is wrong in this strcpy()? Pin
SandipG 22-Sep-08 1:51
SandipG 22-Sep-08 1:51 
GeneralRe: What is wrong in this strcpy()? Pin
Member 550287922-Sep-08 1:57
Member 550287922-Sep-08 1:57 
GeneralRe: What is wrong in this strcpy()? Pin
Rajesh R Subramanian22-Sep-08 2:02
professionalRajesh R Subramanian22-Sep-08 2:02 
GeneralRe: What is wrong in this strcpy()? Pin
SandipG 22-Sep-08 2:05
SandipG 22-Sep-08 2:05 
AnswerRe: What is wrong in this strcpy()? Pin
auralius manurung22-Sep-08 2:25
auralius manurung22-Sep-08 2:25 
QuestionRe: What is wrong in this strcpy()? Pin
CPallini22-Sep-08 2:41
mveCPallini22-Sep-08 2:41 
AnswerRe: What is wrong in this strcpy()? Pin
auralius manurung22-Sep-08 16:45
auralius manurung22-Sep-08 16:45 
GeneralRe: What is wrong in this strcpy()? Pin
CPallini22-Sep-08 22:04
mveCPallini22-Sep-08 22:04 
GeneralRe: What is wrong in this strcpy()? Pin
auralius manurung23-Sep-08 7:43
auralius manurung23-Sep-08 7:43 
AnswerRe: What is wrong in this strcpy()? Pin
David Crow22-Sep-08 3:05
David Crow22-Sep-08 3:05 
AnswerRe: What is wrong in this strcpy()? Pin
Member 419459322-Sep-08 8:31
Member 419459322-Sep-08 8:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.