Me and my friends have had an argument over this topic.
Is it anyway possible to implement polymorphism in C?????
Me and my friends have had an argument over this topic.
Is it anyway possible to implement polymorphism in C?????
Yes. If you want details, search the Web.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Polymorphism in C NOT in C++...!!!
I tried google but what all i found was C++ codes. Would you please take the trouble of explaining me things or post some good links?
Polymorphism in C - CodeProject®
Inheritance and Polymorphism in C - CodeProject®
Both articles start by showing C++ polymorphism, but then move onto a C implementation.
Note that:Originally Posted by Avenger625
- I can read what you write.
- I know which forum I am in when I post.
- I do not confuse C and C++.
- I have done exercises that simulate OOP in programming languages that either do not support certain OO techniques natively, or which was merely an exercise in simulating OOP.
- I have partially read a fairly comprehensive article on simulating OOP in C.
Before telling you to search the Web for details, I entered polymorphism in C into Google just in case C++ articles would have dominated the search. The first three results I got were concerned with C. The fourth was concerned with C#, the fifth was the Wikipedia article on polymorphism in computer science, and the next two were again about polymorphism in C. The first C++ specific entry was the tenth. So, if all that you found was on C++, I wonder at what search terms you used, or maybe your search engine just sucksOriginally Posted by Avenger625
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
When it is possible to simulate OOP features into C then y dont we call it an OOP language?????
"No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
"Have you tried turning it off and on again?" - The IT Crowd
Simulation - Definition and More from the Free Merriam-Webster Dictionary
Note: I have used C to simulate Assembly; but, I would never call C Assembly.Definition of SIMULATION
3a : the imitative representation of the functioning of one system or process by means of the functioning of another <a computer simulation of an industrial process>
Note: I have also use Macros to make C like Pascal; but that does not make C a Pascal language.
Tim S.
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson