Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

carlosbutler

macrumors 6502a
Original poster
MSVista.jpg


yes i know that this isnt true, or at least i think it isnt. but its true what it states...

thought id just share it, see what you all thought
 
even as someone who barely understands coding, i found that to be funny

i think the thing that got me was "int workingnewfeatures=0" 😛
 
I found this particularly humorous, as I am currently taking Java classes. Thank you for the laugh! 🙂
 
no problem. interstingly enough i put it on a xbox/windows based forum, and i think i got banned or somthing.

thought id see what they thought (kind of relised i would be winding them up😛)
 
Fixed the code a bit.
const int workingNewFeatures=0;

😀

🙁 and youve lost me.

i start AP comp sciences for my senior year next year tho! hopefully that will start me on my way, we are only learning java tho🙁

is it a relativly simple switch to C coding when youve learned the basics of how coding works?
 
🙁 and youve lost me.

i start AP comp sciences for my senior year next year tho! hopefully that will start me on my way, we are only learning java tho🙁

is it a relativly simple switch to C coding when youve learned the basics of how coding works?

It's been so long since I've done any C++, but don't feel lost.

int workingNewFeatures=0;
This is a variable. At any point, you can change its value.
workingNewFeatures++;
workingNewFeatures+=5;
etc.

However, this...
const int workingNewFeatures=0;
This is a constant value. Any reference to workingNewFeatures is 0. It's ALWAYS 0. You cannot change it.
Most older textbooks would prefer to see constants in all caps...
const int WORKING_NEW_FEATURES=0;

A constant might make more sense to you, if you used it like this:
const float PI=3.14;

You cannot change PI, since it's always 3.14.

Ok, done teaching for today. 🙂
 
It's been so long since I've done any C++, but don't feel lost.

int workingNewFeatures=0;
This is a variable. At any point, you can change its value.
workingNewFeatures++;
workingNewFeatures+=5;
etc.

However, this...
const int workingNewFeatures=0;
This is a constant value. Any reference to workingNewFeatures is 0. It's ALWAYS 0. You cannot change it.
Most older textbooks would prefer to see constants in all caps...
const int WORKING_NEW_FEATURES=0;

A constant might make more sense to you, if you used it like this:
const float PI=3.14;

You cannot change PI, since it's always 3.14.

Ok, done teaching for today. 🙂

wow, that actually mad sense, i guess its good that i could follow that while having literally no experience in coding whatsoever?

thanks man😀:apple:
 
wow, that actually mad sense, i guess its good that i could follow that while having literally no experience in coding whatsoever?

thanks man😀:apple:

Yes. The big mistake most people make - myself included - is that they try rushing into stuff too fast. One example at a time... you'll get there. 🙂
 
Yes. The big mistake most people make - myself included - is that they try rushing into stuff too fast. One example at a time... you'll get there. 🙂

lol the thing that confused me was i didnt know what const even meant, had i known that it meant constant i would have gotten it.

thanks alot tho man, and in reguards to ur username, scary movie one was the only one i could actually sit through lol
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.