A fun MapleStory Private Server.
 
HomeHome  CalendarCalendar  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log in  

Share | 
 

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

View previous topic View next topic Go down 
AuthorMessage
Zachy
Addicted Cookie
avatar

Posts : 322
Points : 3288
Join date : 2009-07-12
Age : 26
Location : USA

PostSubject: Simple programs#1& how it works/what makes it up   Wed 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
View user profile
[Admin]1337
Co-Owner~[Admin]1337
Co-Owner~[Admin]1337


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

PostSubject: Re: Simple programs#1& how it works/what makes it up   Wed 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;
}

_________________
Don't Edit/Delete/Move My Post/Topics

If you need help, email SmileyCookieMSHelp@gmail.com.

Learning C++/D3D
Back to top Go down
View user profile
Zachy
Addicted Cookie
avatar

Posts : 322
Points : 3288
Join date : 2009-07-12
Age : 26
Location : USA

PostSubject: Re: Simple programs#1& how it works/what makes it up   Wed 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
View user profile
Admin
#1 loler: [Owner]Henry
#1 loler: [Owner]Henry
avatar

Posts : 1708
Points : 4688
Join date : 2009-07-04
Age : 21
Location : Southern California

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

ok, what is this?

_________________
InGame name: [Owner]Henry ̿̿ ̿̿ ̿ ̿̿̿'\̵͇̿̿\

Made by Smexyx3 or Iloveyou or [gm]aly:) or Bunny. Man, she's changing her IGN a lot...
My first maple animation XD
Back to top Go down
View user profile http://lucidityms.forumotion.net
[Admin]1337
Co-Owner~[Admin]1337
Co-Owner~[Admin]1337


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

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

Admin wrote:
ok, what is this?
Code for program -_-

_________________
Don't Edit/Delete/Move My Post/Topics

If you need help, email SmileyCookieMSHelp@gmail.com.

Learning C++/D3D
Back to top Go down
View user profile
Zachy
Addicted Cookie
avatar

Posts : 322
Points : 3288
Join date : 2009-07-12
Age : 26
Location : USA

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

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


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

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

Once executed itll say
"Hello World!"

_________________
Don't Edit/Delete/Move My Post/Topics

If you need help, email SmileyCookieMSHelp@gmail.com.

Learning C++/D3D
Back to top Go down
View user profile
Zachy
Addicted Cookie
avatar

Posts : 322
Points : 3288
Join date : 2009-07-12
Age : 26
Location : USA

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

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


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

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

but its true.

_________________
Don't Edit/Delete/Move My Post/Topics

If you need help, email SmileyCookieMSHelp@gmail.com.

Learning C++/D3D
Back to top Go down
View user profile
Zachy
Addicted Cookie
avatar

Posts : 322
Points : 3288
Join date : 2009-07-12
Age : 26
Location : USA

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

Did i say it wasn't?

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


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

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

o_o

_________________
Don't Edit/Delete/Move My Post/Topics

If you need help, email SmileyCookieMSHelp@gmail.com.

Learning C++/D3D
Back to top Go down
View user profile
Zachy
Addicted Cookie
avatar

Posts : 322
Points : 3288
Join date : 2009-07-12
Age : 26
Location : USA

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

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


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

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

o_O

_________________
Don't Edit/Delete/Move My Post/Topics

If you need help, email SmileyCookieMSHelp@gmail.com.

Learning C++/D3D
Back to top Go down
View user profile
Zachy
Addicted Cookie
avatar

Posts : 322
Points : 3288
Join date : 2009-07-12
Age : 26
Location : USA

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

o_O
Back to top Go down
View user profile
Admin
#1 loler: [Owner]Henry
#1 loler: [Owner]Henry
avatar

Posts : 1708
Points : 4688
Join date : 2009-07-04
Age : 21
Location : Southern California

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

im confused with tech stuff

_________________
InGame name: [Owner]Henry ̿̿ ̿̿ ̿ ̿̿̿'\̵͇̿̿\

Made by Smexyx3 or Iloveyou or [gm]aly:) or Bunny. Man, she's changing her IGN a lot...
My first maple animation XD
Back to top Go down
View user profile http://lucidityms.forumotion.net
Zachy
Addicted Cookie
avatar

Posts : 322
Points : 3288
Join date : 2009-07-12
Age : 26
Location : USA

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

Just read it~
Back to top Go down
View user profile
Sponsored content




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

Back to top Go down
 
Simple programs#1& how it works/what makes it up
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» RR WORKS PLZ TELL WOLFY!
» example of Basic turbo C program in PLC Programming
» Basic Information How Cellphone Works?
» P2P programs
» Anand: How memory works in chess

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