•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 422,662 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,643 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 277 | Replies: 7
![]() |
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 10:12 pm. Reason: add code tags
•
•
Join Date: Jan 2007
Location: Maryland, USA
Posts: 1,036
Reputation:
Rep Power: 4
Solved Threads: 23
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
cplusplus Syntax (Toggle Plain Text)
using namespace std;
tuxation.com - Linux articles, tutorials, and discussions
// 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 10:13 pm. Reason: add code tags
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,114
Reputation:
Rep Power: 38
Solved Threads: 928
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.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
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 10:21 pm.
tuxation.com - Linux articles, tutorials, and discussions
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 10:36 pm.
tuxation.com - Linux articles, tutorials, and discussions
![]() |
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- driver_irql error question (Windows NT / 2000 / XP / 2003)
Other Threads in the C++ Forum
- Previous Thread: build windows problem
- Next Thread: C++ forbids initialization of member



Linear Mode