| | |
Problem with Switch statement ?
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
•
•
Originally Posted by bandm
It's not that I ignored it, I tried it and it and got tons more errors than before I tried it.
•
•
•
•
Originally Posted by Dave Sinkula
Then some more errors that can be fixed by enclosing the statements for the switch within {}.
•
•
•
•
Originally Posted by bandm
Doesn't putting the variable outside the brackets just make them global?
I wouldn't think that it should effect anything, then I am just a greenhorn trying to learn.
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
All Right!
Now we're talkin. I just didn't understand the {} thing in the earlier post.
I'm still on a learning curve, but I sur appreciate the help here.
I thought the comiler caught all the errors and listed them, but now I see that it sometimes will return before checking all of them. Correct?
Thanks, Guy's
BandM
Now we're talkin. I just didn't understand the {} thing in the earlier post.
I'm still on a learning curve, but I sur appreciate the help here.
I thought the comiler caught all the errors and listed them, but now I see that it sometimes will return before checking all of them. Correct?
Thanks, Guy's

BandM
•
•
•
•
Originally Posted by bandm
I thought the comiler caught all the errors and listed them, but now I see that it sometimes will return before checking all of them. Correct?
Last edited by Dave Sinkula; Aug 11th, 2005 at 4:24 pm. Reason: Changed 'line' to 'program'.
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
![]() |
Similar Threads
- switch statement on String in Java (Java)
- Switch Statement (Java)
- switch statement (C)
- Switch Statement, Fall-Through. (C)
- Problems with switch statement (C++)
- Problems with switch statement (C++)
Other Threads in the C++ Forum
- Previous Thread: strings in c
- Next Thread: bin trees
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file forms fstream function functions game generator getline givemetehcodez graph homeworkhelper iamthwee ifstream image input int java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






