elaborate

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
Pharoah
Posts: 5
Joined: May 12th, 2012, 8:36 am

elaborate

Post by Pharoah » May 12th, 2012, 6:57 pm

what do you mean by if the statment is true or false what does that mean?
and why do you insert { } these alot r they needed if so what do they do?
;) thanks

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: elaborate

Post by LuX » May 12th, 2012, 7:13 pm

If statement looks up if the statement inside () is correct or incorrect; true or false.
the {} just points out the program from where to what you want it to do something.

Example:

Code: Select all

int a = 1;
int b;
int c;

if (a == 1)     // Asks if 'a' is '1'
{
    b = 2; // If 'a' is '1' then do this
}
else
{
    c = 4;     // But if 'a' is not 1; if it's anything else but '1', do this
}
In English that says:
"If 'a' is 1, then do whatever is between {}, but else, if 'a' is not 1, then do what ever is between the next {}"
ʕ •ᴥ•ʔ

User avatar
magusofmirrors
Posts: 56
Joined: May 12th, 2012, 10:03 pm

Re: elaborate

Post by magusofmirrors » May 12th, 2012, 10:37 pm

I believe you should learn regular C++ programming first before tackling game programming. Go look at cplusplus.com 's tutorials. They teach C++ and programming pretty well there.

Edit: I see there are "regular C++ tutorials". I thought this was the link to regular programming to graphics and stuff. Guess I'll have to wait for that. Silly me.
The admins are coming!!!

Image

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: elaborate

Post by chili » May 13th, 2012, 8:09 am

Yeah, the series I'm working on right now is a beginner C++ series. The only difference between this and other intro series is that this one starts off with a graphics framework instead of starting out using console/iostream/stdio calls.
Chili

Post Reply