| | |
Haha, Newbie question here!
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
Ok, no matter what compiler i use, i can never find a compiler that will build/compile/run a single file like the one I have used in my school.
i got Code::Blocks to compile my test file
the code is short:
// Test file
can anyone please help me? the book I have starts off with single file programs and this is a major mountain that I keep stopping at whenever I start to read this book.
Thank You
i got Code::Blocks to compile my test file
the code is short:
// Test file
c++ Syntax (Toggle Plain Text)
include <iostream> int main() { cout << "yarg!" end1; return 0; }
can anyone please help me? the book I have starts off with single file programs and this is a major mountain that I keep stopping at whenever I start to read this book.
Thank You
Last edited by Ancient Dragon; Feb 12th, 2008 at 11:12 pm. Reason: add code tags
And you're likely experiencing problems with the std:: namespace. Try prefixing
Or, if you don't like doing that, just add
after you include <iostream>.
cout and endl with std:: .Or, if you don't like doing that, just add
C++ Syntax (Toggle Plain Text)
using namespace std;
"Technological progress is like an axe in the hands of a pathological criminal."
// Test file
No errors, yet the run, build, and other buttons of that sort are grayed and unusable.
c++ Syntax (Toggle Plain Text)
include <iostream> using namespace std; int main() { cout << "yarg!" << end1; return 0; }
Last edited by Ancient Dragon; Feb 12th, 2008 at 11:13 pm. Reason: add code tags
You probably failed to create a new project. Select menu item File --> New Project, then select the Console Project icon then fill in the rest of the information. After that those buttons and menu items will be enabled.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
It should be endl, not end1.
Also, you forgot to put a # symbol before 'include'. It should read:
Also, you forgot to put a # symbol before 'include'. It should read:
c++ Syntax (Toggle Plain Text)
#include <iostream>
Last edited by John A; Feb 12th, 2008 at 11:21 pm.
"Technological progress is like an axe in the hands of a pathological criminal."
Use code tags. You can use [code] (code goes here) [/code] for any language, or for language-specific highlighting, you can do [code=language] (for example, [code=c++]) and of course [/code].
Last edited by John A; Feb 12th, 2008 at 11:36 pm.
"Technological progress is like an axe in the hands of a pathological criminal."
![]() |
Similar Threads
- driver_irql error question (Windows NT / 2000 / XP)
Other Threads in the C++ Forum
- Previous Thread: build windows problem
- Next Thread: C++ forbids initialization of member
| Thread Tools | Search this Thread |
api array based binary bitmap c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news node number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






