Next Gen Boards
 

Sponsored Links
Arcade YouTube vbBux / vbPlaza Calendar FAQ

Reply
 
Thread Tools Display Modes  
ShooterX
Private Grade 1
 
Join Date: Feb 2008
Posts: 24
Rep Power: 0 ShooterX is on a distinguished road Reputation: 10
Points: 24,154.49
Bank: 1,268.24
Total Points: 25,422.73
ShooterX is offline
 
Send a message via AIM to ShooterXSend a message via MSN to ShooterX
 
#1
02-02-2008, 08:50 PM   #1
Reply With Quote
New to C++

Hey, I am new to C++ and I have a question. Whenever I write a code, for example the first code in the 100 page C++ book, which is
Code:
//Game Over
//A first C++ Program

#include <iostream>

int main()
{
		std::cout << "GAME ;OVER!" << std::endl;
		return 0;
}
and I compile and run it, the window that looks like command prompt opens and closes real fast. It has done this with other small similar programs that I did not compile or make myself. I was wondering if anybody knew what the problem was and how to fix it.

Thanks
Report Post
wildirshman13
Brigadier Grade 4
 
wildirshman13's Avatar
 
Join Date: May 2007
Location: kansas city
Posts: 1,078
Rep Power: 3 wildirshman13 is on a distinguished road Reputation: 23
Points: 139,433.39
Bank: 0.00
Total Points: 139,433.39
For having wicked sigs and always being possitive - kezzer007 GIMME SUM SUGAR! - TERR0R_ Well you see even though you send me a big paragraph in this tiny little space, I can still read it so feel free to type a novel. I don't mind, I actually enjoy novels. Oh, and I'm doing great. I think this is how we should communicate from now on ra - TERR0R_ Thank you for the GFX you made for me from Uni4on - Uni4on hi i randomly did this - nathstar101 
wildirshman13 is offline
 
Send a message via MSN to wildirshman13
 
#2
02-03-2008, 12:01 AM   #2
Reply With Quote
welcome to C++ i just recently stared too
im also using the book its really good

alright yeah this is a fairly common error for people it happened to me
what you need to do is add
"system("pause");"
in a line right before return 0;

what happens is that your computer dosent no to "pause"
so it opens up the window displays game over and closes it before we can see it

also that is only the first 100 pages of the book theres another 275 ish pages just look back a page or two and haloman posted a link in where you can download the whole book
eventually if you want to continue past the first 100 pages youll have to dl the book
__________________



If you like my sigs rep me (thanks for the rep guys i appreciate the feedback!)
Report Post
ShooterX
Private Grade 1
 
Join Date: Feb 2008
Posts: 24
Rep Power: 0 ShooterX is on a distinguished road Reputation: 10
Points: 24,154.49
Bank: 1,268.24
Total Points: 25,422.73
ShooterX is offline
 
Send a message via AIM to ShooterXSend a message via MSN to ShooterX
 
#3
02-03-2008, 12:41 AM   #3
Reply With Quote
Thanks for your help, +rep

EDIT:WORKS thanks a LOT man I really appreciate it lol

Last edited by ShooterX; 02-03-2008 at 12:55 AM..
Report Post
Solid_snake
Apprentice Grade 1
 
Join Date: Feb 2008
Posts: 2
Rep Power: 0 Solid_snake is on a distinguished road Reputation: 10
Points: 10,922.51
Bank: 1,000.00
Total Points: 11,922.51
Solid_snake is offline
 
 
#4
02-04-2008, 04:34 AM   #4
Reply With Quote
Quote:
Originally Posted by wildirshman13 View Post
welcome to C++ i just recently stared too
im also using the book its really good

alright yeah this is a fairly common error for people it happened to me
what you need to do is add
"system("pause");"
in a line right before return 0;

what happens is that your computer dosent no to "pause"
so it opens up the window displays game over and closes it before we can see it

also that is only the first 100 pages of the book theres another 275 ish pages just look back a page or two and haloman posted a link in where you can download the whole book
eventually if you want to continue past the first 100 pages youll have to dl the book
Hey man i ve been looking for that book that you can download but i cant find the link, can you b kind enough to share it with me?

Thank you
Report Post
wildirshman13
Brigadier Grade 4
 
wildirshman13's Avatar
 
Join Date: May 2007
Location: kansas city
Posts: 1,078
Rep Power: 3 wildirshman13 is on a distinguished road Reputation: 23
Points: 139,433.39
Bank: 0.00
Total Points: 139,433.39
For having wicked sigs and always being possitive - kezzer007 GIMME SUM SUGAR! - TERR0R_ Well you see even though you send me a big paragraph in this tiny little space, I can still read it so feel free to type a novel. I don't mind, I actually enjoy novels. Oh, and I'm doing great. I think this is how we should communicate from now on ra - TERR0R_ Thank you for the GFX you made for me from Uni4on - Uni4on hi i randomly did this - nathstar101 
wildirshman13 is offline
 
Send a message via MSN to wildirshman13
 
#5
02-04-2008, 06:01 PM   #5
Reply With Quote
here ill find the topic for you
http://www.nextgenboards.com/vb/comp...methrower.html
you need adobe reader to read it
__________________



If you like my sigs rep me (thanks for the rep guys i appreciate the feedback!)
Report Post
decoder9
Gunnery Sergeant Grade 1
 
decoder9's Avatar
 
Join Date: Jan 2008
Location: Cabo Rojo
Posts: 104
Rep Power: 1 decoder9 is on a distinguished road Reputation: 10
Points: 7,564.10
Bank: 46,526.50
Total Points: 54,090.60
decoder9 is offline
 
Send a message via MSN to decoder9
 
#6
02-09-2008, 02:52 AM   #6
Reply With Quote
wats c++? can u tell me
Report Post
wildirshman13
Brigadier Grade 4
 
wildirshman13's Avatar
 
Join Date: May 2007
Location: kansas city
Posts: 1,078
Rep Power: 3 wildirshman13 is on a distinguished road Reputation: 23
Points: 139,433.39
Bank: 0.00
Total Points: 139,433.39
For having wicked sigs and always being possitive - kezzer007 GIMME SUM SUGAR! - TERR0R_ Well you see even though you send me a big paragraph in this tiny little space, I can still read it so feel free to type a novel. I don't mind, I actually enjoy novels. Oh, and I'm doing great. I think this is how we should communicate from now on ra - TERR0R_ Thank you for the GFX you made for me from Uni4on - Uni4on hi i randomly did this - nathstar101 
wildirshman13 is offline
 
Send a message via MSN to wildirshman13
 
#7
02-09-2008, 04:19 AM   #7
Reply With Quote
Quote:
Originally Posted by decoder9 View Post
wats c++? can u tell me
C++ is a programing language it is most commonly used in the video games that are produced today
how ever there are many other programing languages and they all have their advantages and disadvantages
__________________



If you like my sigs rep me (thanks for the rep guys i appreciate the feedback!)
Report Post
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

top Go to Top All times are GMT -4. The time now is 05:49 PM.

Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 Copyright ©2006 - 2008, NextGenBoards. All Rights Reserved