Quote:Original post by conejo5991cout and cin are not 'primitive' nor are they 'types. They aren't primitive in the same way if/else and while/do are. None of those things are types either, 'int' and 'float' are types. Also, there is no 'next' in C++ so I'm not sure where you got that from. cout and cin are objects provided by the compiler vendor that allow the program to interact with a console. If you don't need to interact with the console you don't need cout or cin.
cout>>, or cin>>, or if/else, or while/do, for/next
That kind of thing. All things algorithmic.
Quote:Once you get OOP going, the member function at least has these things right?Many classes will use some or all of those things, but it's not really a requirement so much as a byproduct of how programming works. One thing that many programs don't actually use in the 'real world' is cout and cin. It's almost impossible to avoid ifs, whiles, and fors in a program though. An individual member function doesn't necessarily have to use any of that to work even if most will. It depends on what the member function does. Sometimes the member function will just do do some math or even just return data. It depends and it's not a good idea to make hard and fast 'rules' about what a program 'must' have.
Quote:But two or three replies ago, someone said that OBJECTS have only data. I was under the mistaken impression that OBJECTS have these primitive algorithmic types within them.As you said in your original post "a member function is associated with an object". Associated is kind of a loose term, so in some sense an object could have 'algorithms in it', but that's generally not the most productive way to think about it. An object has data and associated member functions, but the member functions aren't really part of an object. They are however associated with all of the objects of that type(ie, the class) and the member functions operate on individual[i/] objects when invoked.
Is that true?
This concept can be further illustrated by comparing regular member functions to static member functions. Static member functions don't operate on an object they operate on all objects(ie, the class). As such a static member function can't modify member variables of individual objects(how would the program know which members to modify?), only static member variables which are shared between all objects. I wouldn't be surprised if that confuses you further if so I'm sorry.
All that aside, in many cases the distinction between 'an object is only data with associated member functions' and 'an object is data and member functions' won't really matter. But eventually you'll do something that won't make sense unless you remember that there is one set of code shared by multiple sets of data.
Quote:And by the way, is there such a thing online as a simple C++ OOP course, maybe even free, but you can't expect too much I guess, where the instructor could possibly clear all these things up for me, and then I could really get a jumpstart on coding?There's not really any place where someone will work with you one-on-one. But if you have further questions you can ask here. The closest thing I can think of to what you want is right here at gamedev in the "CPP Workshop" forum. The concept was to have a workshop where everyone would follow along in the same book and post questions and get answers. You can post a question, but you might not get answer for awhile as there isn't heavy traffic there any more. However, there's a good chance someone has already had the same questions as you so you could just read the threads associated with a particular chapter for questions and answers other people had.
Hope this helps.