why is a stray error caused?
how to rectify a stray error in a c progam?
why is a stray error caused?
how to rectify a stray error in a c progam?
Last edited by Salem; 07-13-2011 at 10:18 AM. Reason: Remove font colour and size abuse - it does nothing if you make the whole text the same
You should probably actually include the entire error message. It probably says something like "stray character '»' encountered" (for some value of »); and that just means that you have a character in your source code file that doesn't belong.
We most often see this when you blindly copy/paste code from some website or other place.
Especially when they've overdone the pretty-printing, for example turning " into ʺ to make it look 'better'
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.