Welcome
Welcome to the forums of AntiRTFM's Absolute N00b Spoonfeed C++ Tutorials!

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, <a href="/profile.php?mode=register">join our community today</a>!

first program

Think you can spy out that little nasty bug? Try debugging some code in here

first program

Postby PcWizKid on Wed Aug 12, 2009 6:04 pm

I just saw the third video tutorial and rote the code but it does not work someone check it out

Code: Select all
#include "stdafx.h"




#include <iostream>

using namespace std()

int main()
(
   cout <<"Hollo World" ;
   cin.get();
   return 0;
)
PcWizKid
 
Posts: 1
Joined: Wed Aug 12, 2009 10:53 am

Re: first program

Postby vEjEsE on Wed Aug 12, 2009 6:18 pm

It's using namespace std;
You wrote it "using namespace std()"

And also, a function's scope is delimited by {}, not by (). Focus on minor things.
Does a universe exist if there is no life to acknowledge it's existence?
User avatar
vEjEsE
 
Posts: 48
Joined: Mon Aug 03, 2009 12:48 am

Re: first program

Postby pastaboyy on Sun Aug 16, 2009 2:15 am

you wrote
using namespace std(). it should be "std;"

also, you used () in the function instead of {}
I'm 13 (maybe more now) and i love programming. I will take all the help i can get and
am eager to learn
But also, CANNIBAL CORPSE RULES!!!!!!!!!!!!!
pastaboyy
 
Posts: 1
Joined: Sat Aug 15, 2009 6:38 pm

Re: first program

Postby Daywids on Sat Sep 05, 2009 4:18 pm

You can use this:

#include <iostream>

using namespace std;

int main()
{
cout<<"Hello, World! ";
system ("PAUSE");
return 0;
}
Daywids
 
Posts: 2
Joined: Sat Sep 05, 2009 4:12 pm

Re: first program

Postby Ruddie on Wed Sep 23, 2009 11:37 am

Daywids wrote:You can use this:

#include <iostream>

using namespace std;

int main()
{
cout<<"Hello, World! ";
system ("PAUSE");
return 0;
}



I prefer not to use system("PAUSE");

as it will show: "Please enter a key to enter....."

what I do myself, is make an other int, that I call int donotquit most of the time.

then just do cin>>donotquit;
that's fixing the whole darn thing about the quitting thing =)!
Cheese tastes good!
User avatar
Ruddie
 
Posts: 36
Joined: Tue Sep 22, 2009 3:56 pm
Location: Netherlands


Return to Debug

Who is online

Users browsing this forum: No registered users and 0 guests