I have a confession

Ive been programming in c++ for about 2 years now... and your not going to believe me.. but i have never used classes or any advanced topic in my programs... I've managed to inch my way and squeeze around every little thing to avoid having to do things the right way because when i try i desperately just can not seem to grasp it.. i feel like i really need to learn this the right way. i don't know if anyone would be willing to give me a push in topics like structs, classes, polymorphism and such. but if any one would want to help i would be willing to try.

(yes i have looked through many tutorials on these topics, but when theres something i cant grasp on actually using i just go back to not using it)
this is in the wrong section
You, my friend, need to learn Java. This is a very simple way of explaining classes, polymorphism, and other class-related things that are useful to know. Almost all of the information you will learn in the Java tutorial about classes can be transfered to C++ in some way, all you have to do is learn the syntax.

http://docs.oracle.com/javase/tutorial/getStarted/index.html
Why he shouldn't learn java:

http://nuwen.net/gcc.html#whynotjava

I would stick to C++, but that's my opinion.
closed account (10X9216C)
It keeps all the stuff that I never use in C++ - inheritance, virtuals - OO gook

It sounds more like he is doing some really specific programming. If he is avoiding virtuals odds are he has some giant switch statements somewhere in his code.
There is nothing wrong with a switch statement. Three words... Finite State Machine...
If you want, I can tutor you in C++!

I charge $15 for 2 1/2 hour sessions during the Summer.

And it's okay, if you don't understand right away! Don't give up :)

Email me at:
sparkprogrammer@gmail.com

Joe
i charge 14 for 2 hours and 31 minutes during the summer and the winter

- LBT
closed account (EwCjE3v7)
^ LoL

Put the price down a little and add a minute on, ur smart :D
14 days of doing nothing with my life but studying c++.... i can use classes now just like any other code. pointers, polymorphism.. some serious dedication x.x ...I've greatly improved . (now only to get a few hours sleep for once this week o.0 )

I've had an idea that ill most likely make another post about. I think it would be a great idea to not have a "teacher" but to have someone to collaborate with on both ends. two people with coding experience must find chatting fun.

maybe come up with things and see how many ways it can be solved. there is always room for improvement, as i am one to know this by now. if any one is up for collaboration, and chatting of the sorts. just pm me :). we can learn from each others experiences. as maybe i'm the master of making things a lot more complex than they need to be I've gained from that the ability to control difficult situations. now that I have improved i can use that to my advantage. if any one wants someone to chat on the topic, i wont mind at all.

everyone have a nice day :) -thanks
Like you, I started with C-looking code.

I only started to use classes as utilities (not using OOP as the base of my code). For instance, my first serious class would be used like an ostream object, but simultaneously wrote to stdout and to a file.

Eventually, I found it useful for code which I kept repeating. Instead, I'd just make an object. This was for tools like set/reset latches, hysteresis, filters.

I implemented a protocol which had slight variants, and this led me to inheritance. My base protocol contained everything required at a high-level to make it work, and I had child classes which contained the specific rules for packing/unpacking data in a format.

Finally, it wasn't until I learned Qt that I picked up actual OOP. GUI design made it easy to go OOP because you can physically see when one window "has a" child, and when my widget "is a" button.

Topic archived. No new replies allowed.