CoolHello World (my first app in C++)

Posts 115 of 15 · Page 1 of 1
Don't forget to Comment and give me some suggestions
Heres a simple step up for ya. Dont have to post the compiled exe though for something this simple. Could just post the source.

Note- You dont need system("pause") to keep the console from quick closing sometimes, just depends on your compiler (i use CodeBlocks)

Code:
#include <iostream>
#include <cstdlib>

using namespace std;

void function(){
    cout << "Hello MPGH" << endl;
    system("pause");
}

int main(){

    function();

}
Quote Originally Posted by h4344 View Post
Heres a simple step up for ya. Dont have to post the compiled exe though for something this simple. Could just post the source.

Note- You dont need system("pause") to keep the console from quick closing sometimes, just depends on your compiler (i use CodeBlocks)

Code:
#include <iostream>
#include <cstdlib>

using namespace std;

void function(){
    cout << "Hello MPGH" << endl;
    system("pause");
}

int main(){

    function();

}
Thanks for suggestion
Quote Originally Posted by h4344 View Post
Heres a simple step up for ya. Dont have to post the compiled exe though for something this simple. Could just post the source.

Note- You dont need system("pause") to keep the console from quick closing sometimes, just depends on your compiler (i use CodeBlocks)

Code:
#include <iostream>
#include <cstdlib>

using namespace std;

void function(){
    cout << "Hello MPGH" << endl;
    system("pause");
}

int main(){

    function();

}
He can Use this Code to Stop The Exe File from Closing Quickly.
 
Code
cin.get();
Quote Originally Posted by dizzyeasy View Post
He can Use this Code to Stop The Exe File from Closing Quickly.
 
Code
cin.get();
system("pause"); does the same
Quote Originally Posted by MarkHC View Post
system("pause"); does the same
Yup But I am used to cin.get(); It's Shorter thou
File Approved.
This is nice and all , but how is this useful?
Quote Originally Posted by BluntGod_ View Post
This is nice and all , but how is this useful?
It isn't.. he just want to show what he learned... We're all like that...
Quote Originally Posted by MarkHC View Post
It isn't.. he just want to show what he learned... We're all like that...
Ohhh , I see... Good job then.
Quote Originally Posted by BluntGod_ View Post
Ohhh , I see... Good job then.
Thanks Buddy
Looks good, Gonna try this also.
Its all about choices... In the end it doesn't matter even tho some people care about that.
Good ava, buddy
Posts 115 of 15 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

Need help?