Hi all, I did try searching for this but I couldn't come with anything (I'm not even sure it is actually a problem!)

I'm a total beginner, about a third the way through C++ A beginners guide by Herbert Schildt, and thats the sum total of my programming experience!

My problem is that when coding the examples that are in the book, ocassionaly I'll get a compile time error and for the life of me a) not be able to match the debug error to any obvious problem in my program AND b) be able to see NO difference between my program and the example text in the book.

Up till now I've put this down to my being too tired to see the spelling mistake or missing semi-colon or whatever but today I came across one that really ........ed me off because the program was only about 12 lines long and was i.d.e.n.t.i.c.a.l. (or so I thought) to the example from the book. I went so far as to download the code from the osbourne books website so I could sit them side by side and compare them and as far as Im concerned, there was no visual difference. However, when i checked the total number of characters in each, mine was off by one character, and the debugger mentioned a missing semi-colon, but the number of semi-colons was identical (I hope you can see my gradual spiral into insanity) .

Anyyyyway, I tried compiling the downloaded code and obviously it went through first time no errors, I cried, I raged.... Then I opened MY notepad file in visual basic (which I dont use normally) and noticed that the 'void' in 'void strInvertCase(char *str)' wasnt highlighted in blue where it should have been. I didn't really understand why that would be the case so just for fun i deleted and rewrote the 'void' and lo and behold it suddenly worked.

So my question is basically; what the hell happened?!? Was there some formatting preventing it from compiling (I didnt even think this was possible with notepad!)?! I repeat I'm a complete newbie at programming but even so this has driven me mad. The only thing I can think of that makes sense with what I know so far, is that I spelled void incorrectly......but... but...i CHECKED! I checked SO thoroughly! Any help would be greatly appreciated and tips on avoiding this in future would be great, for instance, should i just get used to using visual basic so I can see "problems" like this more readily?