// Albatross is teh awesome, for more reasons than seen here. I remember at first seeing the name everywhere wondering who that entertaining person was.
// That find() does indeed seem very cool, and it actually makes sense the first time I heard about it. What I need to get down is how and when I use these things.
// TpOreilly is asking the right questions though lol. It seems so important to understand the terminology because if I don't then I don't understand the books, and I especially don't understand what people are talking about when they... talk about things. lol.
// I'm currently stuck on how to use the whole period-dot operator command thing whatever-it's-called(again, need terminology lol) like for member functions... let alone how the member functions even..work.. I mean I understand the public and private thing a bit, buut my biggest issue is how to simply "type the code correctly".
// I'd like to compliment this "Using C++" book by Bruce Eckel yet again. It has much better ways for working with terminology such as reminding you even way far into the book like "Remember, this does this and that does that so this will happen." though there's still so much that's all "This will be covered fully in Chapter 11" and I'm stuck way early on.
//Oh, and I'd like to add a lot of books say "pointers seem to be the hardest to learn for beginners"... well I understand how they work way more than how to USE them. This is always the problem jeesh! This + lack of terminology understanding == slow learning ;-;.
// There needs to be a place that works with this terminology shizz. Maybe i is an object AND a variable? I don't know but these things should be stated to the extreme for us beginners, rather than hidden in a sentence of a paragraph. I'll read a whole book on programming terms if I have to, easily(well... I want to know absolutely everything about programming anyway so that's me heh ^.^)
Hmm... interesting. Both seem to be correct to a degree, at least according to everyone's favorite wiki (whaddya mean uncyclopedia.wikia.com is your favorite?).
Apparently, object is just a more generic term for variable except in OOP in which case it tends to mean an instance of a class.
A variable is a symbolic name given to some known or unknown quantity or value, for the purpose of allowing the name to be used independently of the value it represents.
An object is any entity that can be manipulated by the commands of a programming language, such as a value, variable, function, or data structure.
(With the later introduction of object oriented programming the same word, "object", refers to a particular instance of a class)
Er... that wasn't that much different from the first post. Does it help anyways?
"A variable represents a particular piece of your computers memory that has been set aside for you to store, retrieve, and manipulate data. So if you wanted to keep track of a players score, you could create a variable for it, then you could retrieve the score to display it.
And for objects it says:
"so far youve seen how to store individual pieces of information in variables and how to manipulate those variable using operators and function. But most of the things you want to represent in games - such as, say, an alien spaceship - are objects. They're encapsulated, cohesive things that combine qualities (such as an energy level) and abilities (for example, firing weapons). "
Anyone care to simply explain the true difference???????
Ah, so they are using the terms that I (and most Computer Scientists?) prefer.
Have you gotten to classes yet, perchance? I mentioned that an object is and instance of a class at least twice. If you know what classes are, you'll know right away at least two of several differences between a class and a more primitive type such as int (hint: ints don't have member functions like std::strings do). ;)
So a variable is just a piece of data that stores information, such as a number or a word. Nothing more, nothing less.
And an object is purely an instance of a class. Nothing more, nothing less.
And a class is kinda like a blueprint, it contains code which says how something looks (if it is a physical thing, like an alien in a game), behaves and what it does (which would be defined in its function).
Even though we treat string like a variable as we use it to store data, its actually an object because it belongs to the string class. The below quote supports what ive just said:
"Unlike traditional c-strings, which are mere sequences of characters in a memory array, C++ string objects belong to a class with many built-in features to operate with strings in a more intuitive way and with some additional useful features common to C++ containers."
I feel that im right by saying all that, Albatross, can you confirm that im right please.
Thanks, the thing which confuzed me to begin with was the word object, you think of an object as being a physical thing (something you cann see on screen), now i know in the c++ language, its not always the case lol