cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
goto or similar
goto or similar
Dec 4, 2010 at 2:58am UTC
jjw1993
(8)
I was wondering if there was a command in c++ like the "goto" command in .bat files, and if so, how do i use it?
Dec 4, 2010 at 3:15am UTC
PiMaster
(359)
There is, though they are generally frowned upon by the majority of the programming community because of their tendency to create "spaghetti code." You use them like this:
1
2
3
mylabel:
//do stuff
goto
mylabel;
Last edited on
Dec 5, 2010 at 10:09pm UTC
Dec 4, 2010 at 3:19am UTC
jjw1993
(8)
Yes I did see that, along with many people saying it was a very bad idea. I think thats what I'll use any way, thank you.
Topic archived. No new replies allowed.