Click here to Skip to main content
15,920,606 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Conversion Problem Pin
Andy20214-Sep-07 5:05
Andy20214-Sep-07 5:05 
QuestionRe: Conversion Problem Pin
David Crow14-Sep-07 5:31
David Crow14-Sep-07 5:31 
AnswerRe: Conversion Problem Pin
Andy20214-Sep-07 9:45
Andy20214-Sep-07 9:45 
GeneralRe: Conversion Problem Pin
Russell'14-Sep-07 7:20
Russell'14-Sep-07 7:20 
AnswerRe: Conversion Problem Pin
Russell'14-Sep-07 4:54
Russell'14-Sep-07 4:54 
AnswerRe: Conversion Problem Pin
Nathan Holt at EMOM14-Sep-07 10:30
Nathan Holt at EMOM14-Sep-07 10:30 
GeneralRe: Conversion Problem Pin
Andy20214-Sep-07 11:24
Andy20214-Sep-07 11:24 
Questionstring or int? Pin
VonHagNDaz14-Sep-07 4:16
VonHagNDaz14-Sep-07 4:16 
Hey guys,

I'm writing a little class that will read data from a file and store it as a string. This data can be either text or a number.

string strHold = csvTable->getValue(row, column);<br />
<br />
char* chHold;<br />
strHold.copy(chHold, strHold.length());<br />
<br />
return atoi(chHold);


I know that atoi() will return a 0 if the value of chHold = "This is not an int," So my question is : what is a good way to check if the zero is actually the number 0 and not a returned zero as the result of atoi("This is not an int").

[Insert Witty Sig Here]

AnswerRe: string or int? Pin
Christian Graus14-Sep-07 4:17
protectorChristian Graus14-Sep-07 4:17 
GeneralRe: string or int? Pin
VonHagNDaz14-Sep-07 4:20
VonHagNDaz14-Sep-07 4:20 
GeneralRe: string or int? Pin
led mike14-Sep-07 4:29
led mike14-Sep-07 4:29 
GeneralRe: string or int? Pin
VonHagNDaz14-Sep-07 4:32
VonHagNDaz14-Sep-07 4:32 
GeneralRe: string or int? Pin
led mike14-Sep-07 4:44
led mike14-Sep-07 4:44 
GeneralRe: string or int? Pin
VonHagNDaz14-Sep-07 4:53
VonHagNDaz14-Sep-07 4:53 
GeneralRe: string or int? Pin
David Crow14-Sep-07 4:23
David Crow14-Sep-07 4:23 
QuestionUnsure of reason for error. Pin
Chris Meech14-Sep-07 4:02
Chris Meech14-Sep-07 4:02 
AnswerRe: Unsure of reason for error. Pin
jhwurmbach14-Sep-07 4:07
jhwurmbach14-Sep-07 4:07 
GeneralRe: Unsure of reason for error. Pin
Chris Meech14-Sep-07 4:40
Chris Meech14-Sep-07 4:40 
GeneralRe: Unsure of reason for error. Pin
jhwurmbach14-Sep-07 4:46
jhwurmbach14-Sep-07 4:46 
AnswerRe: Unsure of reason for error. Pin
Mark Salsbery14-Sep-07 7:04
Mark Salsbery14-Sep-07 7:04 
GeneralRe: Unsure of reason for error. Pin
Chris Meech14-Sep-07 7:29
Chris Meech14-Sep-07 7:29 
Questiondo you think you raelly know the difference of public and private? Pin
includeh1014-Sep-07 3:47
includeh1014-Sep-07 3:47 
QuestionRe: do you think you raelly know the difference of public and private? Pin
Nelek14-Sep-07 4:07
protectorNelek14-Sep-07 4:07 
QuestionRe: do you think you raelly know the difference of public and private? Pin
Maximilien14-Sep-07 4:10
Maximilien14-Sep-07 4:10 
AnswerRe: do you think you raelly know the difference of public and private? Pin
nbugalia14-Sep-07 4:34
nbugalia14-Sep-07 4:34 

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.