Computer Science Canada Cannot Find Symbol (checked all obvious problems) |
Author: | KingGrumpz [ Fri Jan 11, 2013 5:55 pm ] | ||||
Post subject: | Cannot Find Symbol (checked all obvious problems) | ||||
Can someone tell why I keep getting a "Cannot find symbol" error in the code below
Mod Edit: Please wrap you code in either of the following in order to preserve whitespace (indentation) and to highlight the syntax.
|
Author: | Insectoid [ Fri Jan 11, 2013 6:03 pm ] |
Post subject: | RE:Cannot Find Symbol (checked all obvious problems) |
What symbol can it not find, and on what line is the error? |
Author: | KingGrumpz [ Fri Jan 11, 2013 7:29 pm ] |
Post subject: | Re: Cannot Find Symbol (checked all obvious problems) |
}while (x != 2); ^ symbol: variable x location: class Mp3Player 1 error |
Author: | Insectoid [ Fri Jan 11, 2013 7:48 pm ] |
Post subject: | RE:Cannot Find Symbol (checked all obvious problems) |
Where are you declaring x? |
Author: | KingGrumpz [ Sat Jan 12, 2013 8:27 am ] |
Post subject: | Re: Cannot Find Symbol (checked all obvious problems) |
Line 21 (int x = 0; ) |
Author: | Insectoid [ Sat Jan 12, 2013 8:42 am ] |
Post subject: | RE:Cannot Find Symbol (checked all obvious problems) |
Do you think there might be a better place to declare it? |
Author: | KingGrumpz [ Sat Jan 12, 2013 3:04 pm ] |
Post subject: | Re: Cannot Find Symbol (checked all obvious problems) |
I have declared it in multiple places. none worked. |
Author: | Dreadnought [ Sat Jan 12, 2013 3:47 pm ] | ||
Post subject: | Re: Cannot Find Symbol (checked all obvious problems) | ||
Do you understand why the following will not work?
|
Author: | KingGrumpz [ Sun Jan 13, 2013 10:00 am ] |
Post subject: | Re: Cannot Find Symbol (checked all obvious problems) |
I got fed up and just used a while(true), but thanks for the help. |