Hey guys,
I'm having some trouble getting this code to compile.
In fact, it starts compiling, but never stops. When I stop it manually it opens <cstdio>
With some error that it nested too deeply and a lot of files that haven't been declared.
I see a few errors: You are assigning 'getchar' to a string literal, try comparing it with a char instead (line 12). You haven't but braces around your while or if statements, so the break statement isn't in a while loop. Finally, 'counter' isn't initialized - it will be a garbage value. Try this instead:
I dont see any reason that should happen but I see a few problems in the code.
The "{" and "}" are missing for both the while loops
while(getchar() = "\n") should be while(getchar() == '\n')
There are two problems in this first getchar returns a character not a character string second you need to use the equality operator and not assignment operator
It's kinda hard, writing the errors, because there are a lot, like really much.
The strange thing is, I just reinstalled and now it works. However, i've tried installing before without luck.
And, the error will come back eventually :S ?
Ok, if you have a fix for now, that's good. Are you saying from previous experience that you know the error will come back? If that's the case then something is going wrong, such as some of the files being corrupted. Or perhaps less dramatically, the configuration gets changed so that the path to some of the files is incorrect.
I think you're right about the last on, it's properly because the configuration gets changed of some reason.
I'm gonna pay ekstra attention to whatever I'm doing in codeblocks from now to identify the problem.