Hello ladies and gents,

I was just wondering how you would implement this into C if it actually is possible, if not, how do you guys implement an equal way of dealing with this in C ?

For instance, if you would have classes like this in C++:

class Lightwave
{
	...
};

class Modeler : public Lightwave
{
	...
};

class Layout : public Lightwave
{
	...
};

int main()
{
	cout << "Press enter to exit.\n";;

	cin.ignore(cin.rdbuf()->in_avail() + 1);

	return 0;
}

Is it all done with structures then?

Some light reading:
http://ldeniau.home.cern.ch/ldeniau/html/oopc/oopc.html :p

OH BOY :mrgreen:

If you call that light reading, I'd hate to see you give a link to heavy :lol:

Hope you don't mind, I'm going to save this for a later date, first start reading Accelerated C++ ;)

Thanks anyway and Happy New Year :!:

>I'd hate to see you give a link to heavy
The C++ standard would probably be categorized as heavy reading, so would any volume of Knuth.

yes, it can be similated in C with structures. Its not quite the same concept as inherentence, but pretty close. And c++ class methods are not tied to any specific instance of a class -- they are more like static c++ methods.

struct Lightwave
{
  // blabla
}


struct Modeler
{
  struct Lightware lw;
  // blabla
};
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.