By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,851 Members | 2,104 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,851 IT Pros & Developers. It's quick & easy.

Help With random integers in switch statements

P: 1
Hi. I am trying to make a random intiger picked within a switch statement, although it keeps saying that :
Expand|Select|Wrap|Line Numbers
  1. error C2360: initialization of 'number_rolled' is skipped by 'case' label
Please help me. Thank you!
Nov 8 '06 #1
Share this Question
Share on Google+
2 Replies


sonic
P: 40
Please post your code so I can take a look at it.
Nov 8 '06 #2

P: 73
use { }
Expand|Select|Wrap|Line Numbers
  1. switch( a) {
  2. case 1:
  3.    {
  4.         int b = 100;
  5.    }
  6. }
  7.  
Nov 8 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.