| | |
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."
All my posts may be freely redistributed under the terms of the MIT license.
All my posts may be freely redistributed under the terms of the MIT license.
// 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."
All my posts may be freely redistributed under the terms of the MIT license.
All my posts may be freely redistributed under the terms of the MIT license.
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."
All my posts may be freely redistributed under the terms of the MIT license.
All my posts may be freely redistributed under the terms of the MIT license.
![]() |
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 |
Tag cloud for C++
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code compile compiler console conversion convert count data delete deploy dll download dynamiccharacterarray email encryption error file format forms fstream function functions game givemetehcodez graph homeworkhelp iamthwee ifstream input int java lib library lines list loop looping loops map math matrix memory newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg search simple sorting spoonfeeding string strings struct temperature template templates text text-file tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






