435,482 Members | 3,157 Online
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,482 IT Pros & Developers. It's quick & easy.

# Variable retain value between case statements

 P: n/a If I have code like this: int main() { a=1; b=2; x=0; switch(a) { case a: x=50; a=b; break; case b: cout<
5 Replies

 P: n/a al******@gmail.com wrote: If I have code like this: int main() { a=1; b=2; x=0; switch(a) { case a: x=50; a=b; break; case b: cout<

 P: n/a al******@gmail.com wrote: If I have code like this: int main() { a=1; b=2; x=0; switch(a) { case a: x=50; a=b; break; case b: cout<

 P: n/a Scott McPhillips [MVP] wrote: al******@gmail.com wrote: If I have code like this: int main() { a=1; b=2; x=0; switch(a) { case a: x=50; a=b; break; case b: cout<

 P: n/a al******@gmail.com wrote: Scott McPhillips [MVP] wrote: >>al******@gmail.com wrote: >>>If I have code like this: int main(){ a=1; b=2; x=0; switch(a) { case a: x=50; a=b; break; case b: cout<

 P: n/a Jacek Dziedzic wrote: al******@gmail.com wrote: Scott McPhillips [MVP] wrote: >al******@gmail.com wrote:If I have code like this: int main(){ a=1; b=2; x=0; switch(a) { case a: x=50; a=b; break; case b: cout<

### This discussion thread is closed

Replies have been disabled for this discussion.