Click here to Skip to main content
15,887,135 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: cin issues Pin
David Crow24-Jul-06 6:54
David Crow24-Jul-06 6:54 
GeneralRe: cin issues [modified] Pin
Harold_Wishes24-Jul-06 7:07
Harold_Wishes24-Jul-06 7:07 
QuestionRe: cin issues Pin
David Crow24-Jul-06 7:52
David Crow24-Jul-06 7:52 
AnswerRe: cin issues Pin
Harold_Wishes24-Jul-06 8:08
Harold_Wishes24-Jul-06 8:08 
GeneralRe: cin issues Pin
David Crow24-Jul-06 8:32
David Crow24-Jul-06 8:32 
GeneralRe: cin issues Pin
Zac Howland24-Jul-06 9:13
Zac Howland24-Jul-06 9:13 
GeneralRe: cin issues Pin
David Crow24-Jul-06 9:22
David Crow24-Jul-06 9:22 
GeneralRe: cin issues Pin
Zac Howland24-Jul-06 9:30
Zac Howland24-Jul-06 9:30 
DavidCrow wrote:
Same person. Still using sscanf() for validation, even though you provided him an alternative!


So it is. In C++, there are very few cases where using sscanf does not constitude a flaw in your implementation. This is not one of them.

DavidCrow wrote:
I thought about this (i.e., using an int), but since he was storing the input string for later processing, I left it as a string.


Since he needs it to set the iterations for a loop, it is easier (and more efficient) to read it as an int and to then call itoa or sprintf or use streambufs to store it for whatever purpose.

If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac

GeneralRe: cin issues [modified] Pin
Harold_Wishes24-Jul-06 9:28
Harold_Wishes24-Jul-06 9:28 
GeneralRe: cin issues Pin
Harold_Wishes24-Jul-06 9:23
Harold_Wishes24-Jul-06 9:23 
GeneralRe: cin issues Pin
Zac Howland24-Jul-06 9:34
Zac Howland24-Jul-06 9:34 
GeneralRe: cin issues [modified] Pin
Harold_Wishes24-Jul-06 10:07
Harold_Wishes24-Jul-06 10:07 
GeneralRe: cin issues Pin
Zac Howland24-Jul-06 11:08
Zac Howland24-Jul-06 11:08 
GeneralRe: cin issues [modified] Pin
Harold_Wishes24-Jul-06 10:48
Harold_Wishes24-Jul-06 10:48 
GeneralRe: cin issues Pin
Zac Howland25-Jul-06 4:42
Zac Howland25-Jul-06 4:42 
QuestionRe: cin issues Pin
David Crow24-Jul-06 9:41
David Crow24-Jul-06 9:41 
QuestionDisplaying Multiple form in vc++ Pin
ningthemcha24-Jul-06 6:01
ningthemcha24-Jul-06 6:01 
AnswerRe: Displaying Multiple form in vc++ Pin
David Crow24-Jul-06 6:05
David Crow24-Jul-06 6:05 
QuestionVC++ 6.0 IDE mse.exe Pin
bob1697224-Jul-06 5:58
bob1697224-Jul-06 5:58 
AnswerRe: VC++ 6.0 IDE mse.exe Pin
bob1697224-Jul-06 6:03
bob1697224-Jul-06 6:03 
QuestionWindows NT 4.0 DDK download Pin
szilardcs24-Jul-06 5:07
szilardcs24-Jul-06 5:07 
AnswerRe: Windows NT 4.0 DDK download Pin
toxcct24-Jul-06 5:46
toxcct24-Jul-06 5:46 
QuestionError in loading DLL in Windows XP and WIndows 2003 Server Pin
BlrBoy24-Jul-06 4:44
BlrBoy24-Jul-06 4:44 
AnswerRe: Error in loading DLL in Windows XP and WIndows 2003 Server Pin
Mike Dimmick24-Jul-06 6:14
Mike Dimmick24-Jul-06 6:14 
QuestionImporting Makefile project to Visual Studio Pin
pgav24-Jul-06 4:21
pgav24-Jul-06 4:21 

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.