C vs C++

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
guest

C vs C++

Post by guest »

Hello,
What makes me write my OS in C or write it in C++ ?
Can i write it with out using ASM ?
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:C vs C++

Post by Solar »

Not that this hasn't been answered many times over...

C++ requires some runtime support if you want to use any one of:

* exception support,
* Run-Time Type Information (RTTI),
* global / static objects.

It also isn't the "default" OS development language (that's C), and so you will find most tutorials using C code.

On the upside, you get namespaces, templates, classes, ...

And no, you cannot write your OS without ASM, but if you take care you will need very little of it.

http://www.osdev.org/osfaq2
Every good solution is obvious once you've found it.
kseujb

Re:C vs C++

Post by kseujb »

rubbish!!
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:C vs C++

Post by Solar »

Oh, thanks for the detailed, constructive and informative criticism on my post!

Would you care to elaborate what you think is "rubbish"?
Every good solution is obvious once you've found it.
Post Reply