Click here to Skip to main content
15,891,184 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: what's the .h file should I include to use _tstof(), alternative of atof() ? Pin
George L. Jackson17-May-06 16:38
George L. Jackson17-May-06 16:38 
QuestionRe: what's the .h file should I include to use _tstof(), alternative of atof() ? Pin
flyingxu17-May-06 17:14
flyingxu17-May-06 17:14 
QuestionCopy user profiles's files Pin
honae17-May-06 14:21
honae17-May-06 14:21 
AnswerRe: Copy user profiles's files Pin
led mike17-May-06 19:12
led mike17-May-06 19:12 
GeneralRe: Copy user profiles's files Pin
honae18-May-06 2:38
honae18-May-06 2:38 
Questionswitch quantity not an integer! Pin
moloza17-May-06 14:05
moloza17-May-06 14:05 
AnswerRe: switch quantity not an integer! Pin
Peter Weyzen17-May-06 16:03
Peter Weyzen17-May-06 16:03 
AnswerRe: switch quantity not an integer! Pin
Bob Ciora17-May-06 17:24
Bob Ciora17-May-06 17:24 
The segmentation fault is because the scanf statement is writing a new value to the POINTER hello, setting it to the value entered by the user. So if the user enters "4", hello is now a pointer to "address" 4. This will crash.

Do this instead:
<br />
int hello;<br />
printf("Hi, Enter any value > ");<br />
scanf("%d", &hello);<br />
switch(hello)<br />
{<br />
...<br />
...<br />
}<br />




Bob Ciora
AnswerRe: switch quantity not an integer! Pin
Naveen17-May-06 17:51
Naveen17-May-06 17:51 
GeneralRe: switch quantity not an integer! Pin
moloza17-May-06 19:09
moloza17-May-06 19:09 
GeneralRe: switch quantity not an integer! Pin
Naveen17-May-06 19:14
Naveen17-May-06 19:14 
GeneralRe: switch quantity not an integer! Pin
Andrew Hain19-May-06 1:14
Andrew Hain19-May-06 1:14 
AnswerRe: switch quantity not an integer! Pin
ThatsAlok17-May-06 20:14
ThatsAlok17-May-06 20:14 
GeneralRe: switch quantity not an integer! Pin
moloza20-May-06 22:31
moloza20-May-06 22:31 
GeneralRe: switch quantity not an integer! Pin
ThatsAlok21-May-06 18:25
ThatsAlok21-May-06 18:25 
QuestionInter-process Communication Question Pin
softwaremonkey17-May-06 11:45
softwaremonkey17-May-06 11:45 
AnswerRe: Inter-process Communication Question Pin
led mike17-May-06 12:09
led mike17-May-06 12:09 
AnswerRe: Inter-process Communication Question Pin
Peter Weyzen17-May-06 16:07
Peter Weyzen17-May-06 16:07 
AnswerRe: Inter-process Communication Question Pin
Stephen Hewitt17-May-06 18:06
Stephen Hewitt17-May-06 18:06 
GeneralRe: Inter-process Communication Question Pin
softwaremonkey18-May-06 2:05
softwaremonkey18-May-06 2:05 
QuestionSetting a double to infinity Pin
Jader8917-May-06 10:33
Jader8917-May-06 10:33 
AnswerRe: Setting a double to infinity Pin
George L. Jackson17-May-06 10:46
George L. Jackson17-May-06 10:46 
AnswerRe: Setting a double to infinity Pin
Christian Graus17-May-06 11:20
protectorChristian Graus17-May-06 11:20 
AnswerRe: Setting a double to infinity Pin
Eric Dahlvang17-May-06 12:00
Eric Dahlvang17-May-06 12:00 
AnswerRe: Setting a double to infinity Pin
Ryan Binns17-May-06 18:42
Ryan Binns17-May-06 18:42 

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.