class Bird
{ public:
void sing() { cout << "Cherp. Cherp." << endl; }
};
class Bird
{ public:
void sing();
};
#include <iostream>
#include "Bird.h"
using namespace std;
void Bird::sing()
{ std::cout << "Cherp. Cherp." << endl;
}
// object.h
class Object {
foo();
bar();
};
// object.cpp
Object::foo() {do stuff}
Object::bar() {do stuff}
// object.h
class Object {
foo() {dostuff}
bar() {dostuff}
};
It's ROM based, so of course I was coding in C. I felt no need during this time to learn C++.
Now I've found myself forced to learn C++ due to the lack of information/libraries/code examples out there in
normal C. I hate this.
Of course, this casts C++ in a negative light in my eyes. I dislike the concepts of the language (although a
few of the non-object based ones are very interesting, such as overloading) and I'm having a hard time
figuring out WHY some things are the way they are.
So… I came up with a good idea I think. I'm a mud coder… and as a mud coder, I have one hell of an ego.
I have yet to meet a single coder who doesn't have an ego big enough to have its own area code, so let's
do what all people with giant egos like to do… debate.
I want to get a debate started about which is better and why C++ has made some of the changes it has.
The structure is simple… I'll post a "feature" of C++ that I disagree with (or perhaps don't fully understand)
and you can post a reply with your thoughts on the "feature"… either agree or disagree. Whatever you'd like.
So lets get this started.
If OOP is supposed to make everything more centralized to a single object, why on earth do 99% of all objects
have their functions defined OUTSIDE of the object? Doesn't that defy the very point of OOP?