int main()
{
int x = 5;
int y = 7;
std::cout << std::end1;
std::cout << x + y << x * y;
std::cout << std::end1;
char response;
std::cin >> response;
return 0;
}
I'm writing code out of a book for an exercise (this is literally the second one I've ever written, after Hello World). I can't find any typos after looking it over again and again, but for some reason it won't compile. The compiler error message reads 6 C:\Dev-Cpp\Examples\Untitled2.cpp `end1' is not a member of `std'. The same reads for line 8. I'm kind of confused here, since I wrote it exactly how it is in the book. Any and all help is deeply appreciated.
Last edited by pentago; August 19th, 2009 at 10:44 AM.
Oh yeah, and I'm using Dev-C++ 5.0 beta 9.2 (4.9.9.2) (9.0 MB) with Mingw/GCC. Recommendations for a better one are also welcome.
It is fine, at least once you turn off the smart tabs feature. You could also consider using that compiler (or the 4.4.0 version directly from MinGW) with Code::Blocks, or perhaps Microsoft Visual C++ 2008 Express.
Originally Posted by pentago
Okay, new problem. C:\Dev-Cpp\Makefile.win [Build Error] [hello.exe] error 1 ... same line.
What is the exact error message? Note that you did not #include <iostream>.
By the way, please post your code in [code][/code] bbcode tags. You might also want to post your non-Visual C++ issues in the appropriate forum (but leave this one for the moderators to move, if they see fit to do so).
C + C++ Compiler: MinGW port of GCC
Build + Version Control System: SCons + Bazaar
It is fine, at least once you turn off the smart tabs feature. You could also consider using that compiler (or the 4.4.0 version directly from MinGW) with Code::Blocks, or perhaps Microsoft Visual C++ 2008 Express.
I tend to agree with "Why you shouldn't use Dev-C++". Given the other free options available, there's really no reason to use it today.
What is the exact error message? Note that you did not #include <iostream>.
I told you the exact error message (I think). I hit compile and it says C:\Dev-Cpp\Makefile.win [Build Error] [hello.exe] Error 1. I don't know what else to add. What does that mean?
I told you the exact error message (I think). I hit compile and it says C:\Dev-Cpp\Makefile.win [Build Error] [hello.exe] Error 1. I don't know what else to add. What does that mean?
My guess is that you tried to compile a file that was not part of the current project.
C + C++ Compiler: MinGW port of GCC
Build + Version Control System: SCons + Bazaar
Bookmarks