Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > There is no "co...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 14 Topic 43972 of 47925
Post > Topic >>

There is no "continue" for switch?

by xz <zhang.xi.cn@[EMAIL PROTECTED] > Mar 18, 2008 at 08:46 AM

What if I want the following:

vector<int> v;

// v is loaded by push_back()

switch( v.size() ) {
case 2:
//do something

case 4:
//somehow delete two element
//and then do the same thing as in case 2

case 6:
//somehow delete two element
//and then do the same thing as in case 4

default:
//...
}


I thought using "continue" to implement this but got this:

 continue statement not within a loop
 




 14 Posts in Topic:
There is no "continue" for switch?
xz <zhang.xi.cn@[EMAIL  2008-03-18 08:46:10 
Re: There is no "continue" for switch?
Jerry Coffin <jcoffin@  2008-03-18 09:57:27 
Re: There is no "continue" for switch?
Junchen WANG <WangJunc  2008-03-18 09:04:21 
Re: There is no "continue" for switch?
xz <zhang.xi.cn@[EMAIL  2008-03-18 09:21:59 
Re: There is no "continue" for switch?
Jerry Coffin <jcoffin@  2008-03-18 20:08:15 
Re: There is no "continue" for switch?
Junchen WANG <WangJunc  2008-03-18 09:31:14 
Re: There is no "continue" for switch?
Christopher <cpisz@[EM  2008-03-18 10:17:58 
Re: There is no "continue" for switch?
"Victor Bazarov"  2008-03-18 14:10:12 
Re: There is no "continue" for switch?
Paul Brettschneider <p  2008-03-18 23:32:27 
Re: There is no "continue" for switch?
Paul Brettschneider <p  2008-03-18 23:39:32 
Re: There is no "continue" for switch?
Paul Brettschneider <p  2008-03-18 23:42:40 
Re: There is no "continue" for switch?
Alexander Dong Back Kim &  2008-03-18 21:37:22 
Re: There is no "continue" for switch?
Alexander Dong Back Kim &  2008-03-18 21:38:40 
Re: There is no "continue" for switch?
"jason.cipriani@[EMA  2008-03-18 22:21:29 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 6 17:35:06 CDT 2008.