First off I want to say I appreciate anybody who will be able to help me. I am a college graduate and I have taken some programming classes before. HTML, JavaScript, UNIX shell scripting, one C++ class and one assembly language class. I majored in electrical engineering with focus on logic design/digital systems. I don't program at my job now at all.
So anyway I decided I wanted to try programming again. So since my company pays for it I register for a class. The first of 3 classes which if I finish/pass all 3 I will be certified in C++.
I am not sure if this was a bad idea but as it stands I have been out of school for 3 years and all of the programming classes I took in my first 2 years(except assembly).
The first class assumes that u are already fluent in the basics of C++. I would drop the class and take a few refresher courses but it is too late for that so I am just going to do my best.
Anyway with that being said here are some of my questions.
I am trying to understand these following topics:
Pointers
What is the difference between?
P1 and *P1?
Why if I say
int *P1, *P2;
P1=new int;
*P1=42;
P2=p1;
Why does *P2 have the same value of 42 now?
Dynamic Arrays (I don't understand at all so I would appreciate any help or any examples on this for explanation)
Classes(Public and Private)(I kind of understand Classes and Structs I just don't get why we use them, wouldn't it be easier just to use regular functions and local variables) And with that being said that probably means I really don't understand them, lol. Any help with explanations on these would be greatly appreciated
I have a few more questions.
What are the rules for posting code on the forum?
Can I put up my own code and ask for help or hints on how to make it more accurate?
Can I post up code from my book/class and ask for understanding?
Thanks to anybody that is welling to help.
So anyway I decided I wanted to try programming again. So since my company pays for it I register for a class. The first of 3 classes which if I finish/pass all 3 I will be certified in C++.
I am not sure if this was a bad idea but as it stands I have been out of school for 3 years and all of the programming classes I took in my first 2 years(except assembly).
The first class assumes that u are already fluent in the basics of C++. I would drop the class and take a few refresher courses but it is too late for that so I am just going to do my best.
Anyway with that being said here are some of my questions.
I am trying to understand these following topics:
Pointers
What is the difference between?
P1 and *P1?
Why if I say
int *P1, *P2;
P1=new int;
*P1=42;
P2=p1;
Why does *P2 have the same value of 42 now?
Dynamic Arrays (I don't understand at all so I would appreciate any help or any examples on this for explanation)
Classes(Public and Private)(I kind of understand Classes and Structs I just don't get why we use them, wouldn't it be easier just to use regular functions and local variables) And with that being said that probably means I really don't understand them, lol. Any help with explanations on these would be greatly appreciated
I have a few more questions.
What are the rules for posting code on the forum?
Can I put up my own code and ask for help or hints on how to make it more accurate?
Can I post up code from my book/class and ask for understanding?
Thanks to anybody that is welling to help.