Is there a rule that say's you have to have code in a...

certain way. I remember that once I was doing code out of a book and every time I would have the code a certain way it would compile it correctly but when I didn't have it a certain way there would be 1 error.

Ps I'm using visual c++ 2008 express edition.


  • Yes, programming languages (C/C++, PHP etc) have strictly specified syntax. There are a few esoteric exceptions but these are mostly not used for other reasons than fun. Compilers normally tell what kind of error has occured and what it would have expected from the code even if the wording of error messages may be cryptic at times.
  • Is there a place online or a book that will explain to me the syntax rules ? Or do I really have to take a class to learn C++ ?
  • You can safely use internet search engine (such as Google) to find places where C++ syntax can be learned. Keywords such as C++ tutorial give good results, you may want to try to search yourself. I copied the first result to here as well:

    Also I strongly recommend using search engines and trying to find answer yourself before asking from a forum as you get much faster response. Especially for questions that are asked often.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!