I have a code (a long one, so I won't include it) which works fine, and then I want to include Windows.h (by writing #include "Windows.h" at the beginning) to use the function Sleep().
But when I do this I get a bunch of error messages, most of them are: expected unqualified-id before ‘char’
They appear at different seemingly random places in the code (and actually it seems the compiler gets the places a bit wrong; there is never a char declaration right where the error occurs but always close to it).
I've used Sleep() before with no problems. Any ideas?
Yeah sorry about not posting any code but honestly it's a big mess. Anyway, all I can say is that it all works without the #include "Windows.h" and Sleep(), and that I wrote another small functioning program including the two (in answer to your question).
I tried including some char's in the mentioned functioning program that uses Sleep() and it still works.
Is it when you add #include "Windows.h" or the call to Sleep() that it stop working?
Take away parts of your program until you find what is wrong. If you don't find it you hopefully have reached a very small program that is small enough to post here.
Thanks for the advice! I started doing what you say to end up with a postable code but it's just too big a task; it's much easier to find something else than Sleep (which I was only using to find another error anyway).