User forums > Help
Noob compiler problem
mcmillinisillin:
I did change to full command line, however I do not have Internet access on my desktop, I am posting from my iPhone. the program is just a simple tip calculator I'm am doing as an excercise from my textbook, and as this is my first time using c++ I just copied the code directly from the book just to see if the compiler would work.
The code is exactly as I posted previously, the error msgs are:
<code>ming32-gcc.exe. -c "C:\Documents and Settings\My Name\My Documents\programs\CodeBlocks\ Untitled1.c" -o "C:\Documents and Settings\My Name\My Documents\programs\CodeBlocks\Untitled1.o"
//the following text is in red
C:\Documents and Settings\My Name\My Documents\programs\CodeBlocks\Untitled1.c:3:20: error: iostream: No such file or directory
C:\Documents and Settings\My Name\My Documents\programs\CodeBlocks\Untitled1.c:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'namespace'<code>
the following error messages seem a little irrelevant seeing as they have to be caused by the fact that iostream and namespace are not being recognized. And as I said before, I'm typing all of this on an iPhone and it's extremely tedious. I will post the following two error msgs just in case:
<code>C:\Documents an Settings\My Name\My Documents\programs\CodeBlocks\Untitled1.c: In function 'main':
C:\Documents and Settings\My Name\My Documents\programs\CodeBlocks\Untitled1.c:16: error: 'cout' undeclared (first use in function)<code>
mcmillinisillin:
The whitespace is a typo in the post, it is correct in the code, thank you though, I really wish It was that.
Also, sorry about the code tags I did it wrong
Jenna:
It's what I thought.
We have tons of posts about the same issue.
And it shows clearly, that you did not read the part of the wiki-article (link posted by olldbg) carefully.
There is an important hint in the last line of te chapter, that shows you the solution of your problem.
You should of course know that there is a difference between C and C++, but this is beyond the scope of our forum.
mcmillinisillin:
Thank you.
Ceniza:
I would like to take this opportunity to suggest separating the filters in the save dialog, so C and C++ do not get mixed. Have one filter for C files and another one for C++ files. C++ could be the default.
Another option would be doing something like in Microsoft's IDE, where it is clear what type of file your are saving (C, C++, header, ...).
Navigation
[0] Message Index
[*] Previous page
Go to full version