|
|
| 10 Mar 2014 09:28 AM
|
I am very close to passing my programming test in school, but my teacher has decided he is going to teach us C++. So, I am forced to learn it and pass the test. I don't know how to program with C++, so I am trying my best to learn.
If you could help me with this, or just tell me how to do things, that would be very helpful. Thank you in advance, and please don't flame. It makes me sad.
|
|
|
|
|
|
|
Report
Abuse
|
|
|
|
|
|
|
|
|
| 10 Mar 2014 09:34 AM
|
I can help, if you need help on something, I'll try to help.
~OT's official Atheist~
|
|
|
|
|
|
|
Report
Abuse
|
|
|
|
|
| 10 Mar 2014 09:36 AM
|
Thank you for offering to help. I have a couple questions I want to ask though.
First, I understand that C++ is an object-oriented language, but what does that mean exactly? Is it like Java, where everything is an object and you can put methods into them?
Second, C++ uses templates, and I'm not really sure what they are either. Do templates create the structure of a class and then put methods and variables inside of it?
Third, when would I use pointers?
Thanks!
|
|
|
|
|
|
|
Report
Abuse
|
|
|
|
|
| 10 Mar 2014 09:38 AM
|
Oh, and also, how do I declare variables with C++?
|
|
|
|
|
|
|
Report
Abuse
|
|
|
|
|
| 10 Mar 2014 09:41 AM
|
1. Yes.
2. Templates are classes that you can make objects out of using "template".
3. When you use pointers in a function, you will pass the location of the pointer, not the object itself. This means you can change the pointer's value by passing it as a reference to another pointer.
~OT's official Atheist~
|
|
|
|
|
|
|
Report
Abuse
|
|
|
|
|
| 10 Mar 2014 09:45 AM
|
Thank you so much for helping me. I have one more question.
How do I declare a variable in C++?
|
|
|
|
|
|
|
Report
Abuse
|
|
|
|
|
|
|
|
|
| 10 Mar 2014 11:40 AM
|
You just did it. I showed you how to.
~OT's official Atheist~
|
|
|
|
|
|
|
Report
Abuse
|
|
|
|
|
| 10 Mar 2014 11:43 AM
|
Oh, okay. So, I would do this?
int a;
|
|
|
|
|
|
|
Report
Abuse
|
|
|
|
|
| 10 Mar 2014 11:45 AM
|
Yes, or you could say:
int a = 1;
~OT's official Atheist~
|
|
|
|
|
|
|
Report
Abuse
|
|
|
|
|
| 10 Mar 2014 11:48 AM
|
Thank you! That helps alot.
|
|
|
|
|
|
|
Report
Abuse
|
|
|
|
|
| 11 Mar 2014 07:49 AM
|
Guys, can you help me with some pointers?
|
|
|
|
|
|
|
Report
Abuse
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 Mar 2014 05:09 AM
|
If anyone can help, please post here, thank you!
|
|
|
|
|
|
|
Report
Abuse
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 Mar 2014 02:53 PM
|
Please help, my test is in 2 days and I don't want to fail!
|
|
|
|
|
|
|
Report
Abuse
|
|
|
|
|
| 14 Mar 2014 03:29 AM
|
Please guys! I will give a cookie if someone can help!
|
|
|
|
|
|
|
Report
Abuse
|
|
|
|
|