a Class;
an Object in that Class;
a Library
Please use an example
Printable View
a Class;
an Object in that Class;
a Library
Please use an example
A class is a type of object. "Filly is a turtle"
A library is a interface (a tool or set of tools) for a programmer. Also known as API - advanced programmers interface.
API = Application Programming Interface, and it doesn't necessarily have to be in a library.Quote:
Originally posted by kedaman
A class is a type of object. "Filly is a turtle"
A library is a interface (a tool or set of tools) for a programmer. Also known as API - advanced programmers interface.
As far as C++ goes:Code:class Turtle {
public:
Turtle(); // Constructor
~Turtle(); // Destructor
PublicMethod();
private:
PrivateMethod();
int m_iPrivData;
};
Turtle filburt1; // Object of the "Turtle" class
A class is like a cookie cutter (Oh, no! not the cookie cutter analogy again!). Objects are created from a class, like you create a cookie from a cookie cutter.
A Library is a collection of Functions, classes, or whatever that you can use. The STL is a good example. It is a library of various templated container classes.
There is also your Public Library, which is a collection of books =).
Z.
[edit]
Yes, I can type...
"collection fo Functions"
I think my filly is a turtle analogue is better ;)
ARgh, i always get that wrong, ok Application programming interface - can't miss it next time
Hehe, keda, sometimes it really seems like an "advanced programmers interface" :D