• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Illeagal character and non statement errors  RSS feed

 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created this program but the errors I am getting all tell me that each line has the same two errors,

1. not a statement

2. Illegal characters 8221

From what I can see everything is fine for how the statments are set up. Maybe I need to declare all the variables in advance?

 
Marshal
Posts: 64494
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you used to edit your code? If you use a word processor, you are liable to insert control characters which the compiler cannot parse. That might explain the illegal characters.
You haven't declared any of your variables in the code you posted. You have to declare every variable not later than the first occasion you use it.
 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, you need to provide the type for those variable defined.

For example,
upForceOnEbyED = centerLoad/2 + roadWeight/2;

you need to add a type in front of upForceOnEbyED
int upForceOnEbyED = centerLoad/2 + roadWeight/2;

same for all other variable that you have not provide the type definition
 
If you are using a rototiller, you are doing it wrong. Even on this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!