Click here to Skip to main content
14,869,096 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionPass by pointer not working Pin
Joe Smith IX15-May-16 5:52
MemberJoe Smith IX15-May-16 5:52 
AnswerRe: Pass by pointer not working Pin
Victor Nijegorodov15-May-16 10:58
MemberVictor Nijegorodov15-May-16 10:58 
GeneralRe: Pass by pointer not working Pin
Joe Smith IX17-May-16 8:34
MemberJoe Smith IX17-May-16 8:34 
AnswerRe: Pass by pointer not working [fixed] Pin
CPallini15-May-16 22:08
mveCPallini15-May-16 22:08 
GeneralRe: Pass by pointer not working Pin
Joe Smith IX17-May-16 8:25
MemberJoe Smith IX17-May-16 8:25 
GeneralRe: Pass by pointer not working Pin
CPallini17-May-16 9:58
mveCPallini17-May-16 9:58 
QuestionC string operations Pin
Member 1096409913-May-16 5:47
MemberMember 1096409913-May-16 5:47 
AnswerRe: C string operations Pin
Richard MacCutchan13-May-16 6:10
mveRichard MacCutchan13-May-16 6:10 
You are allocating assigning the address of the string literal "test" to the pointer s thus overwriting the address returned by malloc. You should be using strcpy to copy the four characters into the allocated buffer.

[edit]
better terminology as pointed out by member below.
[/edit]

modified 17-Jun-16 4:11am.

GeneralRe: C string operations Pin
Chris Losinger13-May-16 6:37
professionalChris Losinger13-May-16 6:37 
GeneralRe: C string operations Pin
Richard MacCutchan13-May-16 6:43
mveRichard MacCutchan13-May-16 6:43 
GeneralRe: C string operations Pin
Member 1256233616-Jun-16 12:40
MemberMember 1256233616-Jun-16 12:40 
GeneralRe: C string operations Pin
Richard MacCutchan16-Jun-16 22:10
mveRichard MacCutchan16-Jun-16 22:10 
AnswerRe: C string operations Pin
Patrice T14-May-16 3:05
mvePatrice T14-May-16 3:05 
AnswerRe: C string operations Pin
CPallini14-May-16 3:06
mveCPallini14-May-16 3:06 
AnswerRe: C string operations Pin
leon de boer14-May-16 5:58
Memberleon de boer14-May-16 5:58 
QuestionC execl is this a bug ? Pin
Member 1096409913-May-16 5:37
MemberMember 1096409913-May-16 5:37 
GeneralRe: C execl is this a bug ? Pin
Richard MacCutchan13-May-16 6:07
mveRichard MacCutchan13-May-16 6:07 
AnswerRe: C execl is this a bug ? Pin
k505413-May-16 9:56
mvek505413-May-16 9:56 
AnswerRe: C execl is this a bug ? Pin
leon de boer14-May-16 5:44
Memberleon de boer14-May-16 5:44 
QuestionWindows 7 UAC prevents my app to write log data Pin
sdancer7510-May-16 8:25
Membersdancer7510-May-16 8:25 
AnswerRe: Windows 7 UAC prevents my app to write log data Pin
Richard Deeming10-May-16 9:11
mveRichard Deeming10-May-16 9:11 
GeneralRe: Windows 7 UAC prevents my app to write log data Pin
sdancer7511-May-16 3:33
Membersdancer7511-May-16 3:33 
GeneralRe: Windows 7 UAC prevents my app to write log data Pin
Richard Deeming11-May-16 4:31
mveRichard Deeming11-May-16 4:31 
GeneralRe: Windows 7 UAC prevents my app to write log data Pin
sdancer7511-May-16 6:17
Membersdancer7511-May-16 6:17 
Question0xC000041D: An unhandled exception was encountered during a user callback. Pin
Austin Donaghy6-May-16 12:49
MemberAustin Donaghy6-May-16 12:49 

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.