SmileyCookieMS
Would you like to react to this message? Create an account in a few clicks or log in to continue.


A fun MapleStory Private Server.
 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log in  

 

 Simple programs#1& how it works/what makes it up

Go down 
3 posters
AuthorMessage
Zachy
Addicted Cookie
Zachy


Posts : 322
Points : 5745
Join date : 2009-07-12
Age : 32
Location : USA

Simple programs#1& how it works/what makes it up Empty
PostSubject: Simple programs#1& how it works/what makes it up   Simple programs#1& how it works/what makes it up EmptyWed Jul 29, 2009 5:33 pm

Code:
/* Multi-line comment */

//single line comment

#include<stdio.h> /*this allows the script to call a...library? telling the computer how to interperate the commands*/
#include<iostream.h>

using namespace std;
int main()
{
    printf("Hello world");
    cout << "Hello world!";
    return 0;
}
int main() starts the new function main. main is ALWAYS executed FIRST.
Both cout&printf are commands to print text either in console or on screen.


printf works with stdio.h
cout works with iostream.h

iostream.h contains basic commands.

Yeah...

(done in 2 minutes)
Back to top Go down
[Admin]1337
Co-Owner~[Admin]1337
Co-Owner~[Admin]1337



Posts : 1101
Points : 2147488530
Join date : 2009-07-07

Simple programs#1& how it works/what makes it up Empty
PostSubject: Re: Simple programs#1& how it works/what makes it up   Simple programs#1& how it works/what makes it up EmptyWed Jul 29, 2009 6:02 pm

U can just use
Code:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!";
system("PAUSE");
return 0;
}
Back to top Go down
Zachy
Addicted Cookie
Zachy


Posts : 322
Points : 5745
Join date : 2009-07-12
Age : 32
Location : USA

Simple programs#1& how it works/what makes it up Empty
PostSubject: Re: Simple programs#1& how it works/what makes it up   Simple programs#1& how it works/what makes it up EmptyWed Jul 29, 2009 6:48 pm

Thats what i did... you just changed 3 things...

changed iostream.h to iostream, added pause, and deleted the other printf.

its a guide, i was just showing 2 simple ways...
Back to top Go down
Admin
#1 loler: [Owner]Henry
#1 loler: [Owner]Henry
Admin


Posts : 1708
Points : 7145
Join date : 2009-07-04
Age : 28
Location : Southern California

Simple programs#1& how it works/what makes it up Empty
PostSubject: Re: Simple programs#1& how it works/what makes it up   Simple programs#1& how it works/what makes it up EmptySat Aug 01, 2009 4:38 pm

ok, what is this?
Back to top Go down
https://lucidityms.forumotion.net
[Admin]1337
Co-Owner~[Admin]1337
Co-Owner~[Admin]1337



Posts : 1101
Points : 2147488530
Join date : 2009-07-07

Simple programs#1& how it works/what makes it up Empty
PostSubject: Re: Simple programs#1& how it works/what makes it up   Simple programs#1& how it works/what makes it up EmptySat Aug 01, 2009 7:38 pm

Admin wrote:
ok, what is this?
Code for program -_-
Back to top Go down
Zachy
Addicted Cookie
Zachy


Posts : 322
Points : 5745
Join date : 2009-07-12
Age : 32
Location : USA

Simple programs#1& how it works/what makes it up Empty
PostSubject: Re: Simple programs#1& how it works/what makes it up   Simple programs#1& how it works/what makes it up EmptySun Aug 02, 2009 4:02 am

lol....
Yes. its a code. for a program...
Back to top Go down
[Admin]1337
Co-Owner~[Admin]1337
Co-Owner~[Admin]1337



Posts : 1101
Points : 2147488530
Join date : 2009-07-07

Simple programs#1& how it works/what makes it up Empty
PostSubject: Re: Simple programs#1& how it works/what makes it up   Simple programs#1& how it works/what makes it up EmptySun Aug 02, 2009 10:41 am

Once executed itll say
"Hello World!"
Back to top Go down
Zachy
Addicted Cookie
Zachy


Posts : 322
Points : 5745
Join date : 2009-07-12
Age : 32
Location : USA

Simple programs#1& how it works/what makes it up Empty
PostSubject: Re: Simple programs#1& how it works/what makes it up   Simple programs#1& how it works/what makes it up EmptyMon Aug 03, 2009 9:58 am

Lawl...
Back to top Go down
[Admin]1337
Co-Owner~[Admin]1337
Co-Owner~[Admin]1337



Posts : 1101
Points : 2147488530
Join date : 2009-07-07

Simple programs#1& how it works/what makes it up Empty
PostSubject: Re: Simple programs#1& how it works/what makes it up   Simple programs#1& how it works/what makes it up EmptyMon Aug 03, 2009 10:16 am

but its true.
Back to top Go down
Zachy
Addicted Cookie
Zachy


Posts : 322
Points : 5745
Join date : 2009-07-12
Age : 32
Location : USA

Simple programs#1& how it works/what makes it up Empty
PostSubject: Re: Simple programs#1& how it works/what makes it up   Simple programs#1& how it works/what makes it up EmptyTue Aug 04, 2009 1:26 pm

Did i say it wasn't?

o_o
Back to top Go down
[Admin]1337
Co-Owner~[Admin]1337
Co-Owner~[Admin]1337



Posts : 1101
Points : 2147488530
Join date : 2009-07-07

Simple programs#1& how it works/what makes it up Empty
PostSubject: Re: Simple programs#1& how it works/what makes it up   Simple programs#1& how it works/what makes it up EmptyTue Aug 04, 2009 2:03 pm

o_o
Back to top Go down
Zachy
Addicted Cookie
Zachy


Posts : 322
Points : 5745
Join date : 2009-07-12
Age : 32
Location : USA

Simple programs#1& how it works/what makes it up Empty
PostSubject: Re: Simple programs#1& how it works/what makes it up   Simple programs#1& how it works/what makes it up EmptyTue Aug 04, 2009 5:27 pm

o_o, 2 posts till 200~(one after this one)
Back to top Go down
[Admin]1337
Co-Owner~[Admin]1337
Co-Owner~[Admin]1337



Posts : 1101
Points : 2147488530
Join date : 2009-07-07

Simple programs#1& how it works/what makes it up Empty
PostSubject: Re: Simple programs#1& how it works/what makes it up   Simple programs#1& how it works/what makes it up EmptyTue Aug 04, 2009 6:37 pm

o_O
Back to top Go down
Zachy
Addicted Cookie
Zachy


Posts : 322
Points : 5745
Join date : 2009-07-12
Age : 32
Location : USA

Simple programs#1& how it works/what makes it up Empty
PostSubject: Re: Simple programs#1& how it works/what makes it up   Simple programs#1& how it works/what makes it up EmptyWed Aug 05, 2009 5:13 am

o_O
Back to top Go down
Admin
#1 loler: [Owner]Henry
#1 loler: [Owner]Henry
Admin


Posts : 1708
Points : 7145
Join date : 2009-07-04
Age : 28
Location : Southern California

Simple programs#1& how it works/what makes it up Empty
PostSubject: Re: Simple programs#1& how it works/what makes it up   Simple programs#1& how it works/what makes it up EmptySat Aug 08, 2009 6:56 pm

im confused with tech stuff
Back to top Go down
https://lucidityms.forumotion.net
Zachy
Addicted Cookie
Zachy


Posts : 322
Points : 5745
Join date : 2009-07-12
Age : 32
Location : USA

Simple programs#1& how it works/what makes it up Empty
PostSubject: Re: Simple programs#1& how it works/what makes it up   Simple programs#1& how it works/what makes it up EmptySun Aug 09, 2009 12:52 pm

Just read it~
Back to top Go down
Sponsored content





Simple programs#1& how it works/what makes it up Empty
PostSubject: Re: Simple programs#1& how it works/what makes it up   Simple programs#1& how it works/what makes it up Empty

Back to top Go down
 
Simple programs#1& how it works/what makes it up
Back to top 
Page 1 of 1
 Similar topics
-
» OMG NEED RAR V62 FILE THAT WORKS!!!!
» I need a v62 link that works
» Simple way...
» Extremely simple suggestion
» Java Tutorial #2Making Java do your (extremely) simple algebra homework.

Permissions in this forum:You cannot reply to topics in this forum
SmileyCookieMS :: Programming :: C++-
Jump to: