Next Gen Boards
 

Sponsored Links
Arcade YouTube vbBux / vbPlaza Calendar FAQ

Reply
 
Thread Tools Display Modes  
GLoRY GuNz
-GFX Artist-
 
GLoRY GuNz's Avatar
 
Join Date: Aug 2007
Location: Pennsylvania
Posts: 1,404
Rep Power: 3 GLoRY GuNz will become famous soon enough Reputation: 52
Points: 23,225.12
Bank: 521,836.33
Total Points: 545,061.45
Pittsburgh Pittsburgh Steelers
GLoRY GuNz is offline
 
Send a message via Yahoo to GLoRY GuNz
 
#1
02-14-2008, 07:44 PM   #1
Reply With Quote
Really quick Functions tutorial - C++

GLoRY GuNz's really quick function tutorial (for u mamemam)

If you dont have the c++ add on for windows.h then just remove that:)
Code:
#include <iostream>
#include <windows.h>
using namespace std;

//this is where you have to list any functions that you will be using for your program, and in this format
int function1();
int function2(); // will not be used just for example

//start of program; int main is the automatic fuction that c++ gives you, where the program looks first
int main()
{
	function1(); // this will redirect the c++ compiler to go over to the next fuction
	return 0;
}

int function1()
{
	char choice;
	cout << "choose y for restart or n for no restart" << endl;
	cin >> choice;

	switch (choice)
	{
	case 'y': 
		cout << "program will now restart" << endl;
		system("PAUSE");
		function1();//redirects to beginning of function and restarts code
		break;
	case 'n':
		cout << "no restart" << endl;
		system("PAUSE");
		exit(2);
	}
	return 0;
}
__________________
Founder of the Rainbow 6 Vegas Teleportation Glitch
The New James Bond Game is Made by ACTIVISION!!



Report Post
mameman2
Commander Grade 4
 
mameman2's Avatar
 
Join Date: Mar 2007
Location: in the shoutbox mostlikely
Posts: 554
Rep Power: 2 mameman2 is on a distinguished road Reputation: 17
Points: 301.00
Bank: 405,084.79
Total Points: 405,385.79
for giving me 60 bucks - cobrad for getting hacked - RezSide 
Boston Red Sox New England Patriots
mameman2 is offline
 
Send a message via AIM to mameman2Send a message via Yahoo to mameman2
 
#2
02-14-2008, 07:49 PM   #2
Reply With Quote
cool thnx now i understand it bttr...and also about the windows.h or w/e it is there are alot of those thing that u need in oreder 2 run the program in some cases and some i dont have those...so if ur gunna use those that dont come witht the compiler then plz uplode the code or the file


EDIT: RapidShare: 1-Click Webhosting take a look glory
__________________
DONT CLICK HERE

Quote:
[Today 08:54 PM] conrad127:we just abuse our powers and ban people
Quote:
[Today 09:04 PM] Tinsley85: no i'm a noob!!!
Quote:
[Today 10:22 PM] heavytech94: attack and brutally murder mamemam

Last edited by mameman2; 02-14-2008 at 08:42 PM..
Report Post
GLoRY GuNz
-GFX Artist-
 
GLoRY GuNz's Avatar
 
Join Date: Aug 2007
Location: Pennsylvania
Posts: 1,404
Rep Power: 3 GLoRY GuNz will become famous soon enough Reputation: 52
Points: 23,225.12
Bank: 521,836.33
Total Points: 545,061.45
Pittsburgh Pittsburgh Steelers
GLoRY GuNz is offline
 
Send a message via Yahoo to GLoRY GuNz
 
#3
02-14-2008, 08:15 PM   #3
Reply With Quote
I forget how i got the windows.h add on, all i know was it took me like 1 hr to find:)
__________________
Founder of the Rainbow 6 Vegas Teleportation Glitch
The New James Bond Game is Made by ACTIVISION!!



Report Post
Driver
Private Grade 1
 
Join Date: Jun 2007
Posts: 21
Rep Power: 0 Driver is on a distinguished road Reputation: 10
Points: 42,456.65
Bank: 4,329.25
Total Points: 46,785.90
Driver is offline
 
 
#4
02-21-2008, 02:36 PM   #4
Reply With Quote
int function1();
int function2();

shouldn't really be needed, unless your using a dumb compiler :)
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-21-2008, 09:06 PM   #5
Reply With Quote
i had it on there already cause i have visual 2008 beta
anyways the switch function is pretty basic im on about chapter 3 but i still need to review some stuff cause im doing it at a slow rate of once every weekened
__________________



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:54 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