0xedd1e

Honorable
Jul 29, 2012
6
0
10,510
I'm new to programming. I need to know what is the difference between C and C++. what is the best language to develop games and operating systems(among these two langs)?
 

Rusting In Peace

Distinguished
Jul 2, 2009
312
0
19,060
This should help you understand the differences.

You're not the first person new to programming hoping to develop an OS. In time you'll learn the size and futility of such a venture. Perhaps around the time when you encounter bus or segmentation faults.

Good luck.
 

PhilFrisbie

Distinguished
In addition to the mountain of reading Rusting In Peace directed you to, here are my 3 cents (I get three due to my age) :)

C and at least a little assembly are generally considered the standard for OS kernel development. Using C instead of C++ helps to keep the runtime small and makes it easier to debug. BTW, running your new OS code in an emulator (not a modern virtual machine) will greatly help you while debugging your first code.

Now for games, I have always used C, but using C++ has some advantages if you are targeting Windows since the interfaces for the DirectX APIs are biased towards C++ code.
 

Ijack

Distinguished

What a sad attitude! Many of us find OS development a very satisying challenge and hobby. If everyone thought it a futile pursuit we would still be totally beholden to the likes of Microsoft and Apple. To put someone off like this before they have even tried is a great shame.

OP - if you are interested in OS development have a look at Http://wiki.osdev.org . And yes; C is the language of choice largely because of the ease of using it in conjunction with assembler (which you will also need).
 

Rusting In Peace

Distinguished
Jul 2, 2009
312
0
19,060


I should probably clarify that I meant doing an OS from scratch knowing nothing about programming. Contributing to Linux distros is great and productive regardless of experience.

And we wouldn't be gripped by either Microsoft or Apple because others developing alternatives were already well versed in programming and the market wasn't saturated!

Time to take of the kid gloves Ijack! ;)

I guess I took mine off and appeared to put steel ones on instead. My "Good luck" was genuine!
 

Ijack

Distinguished
I meant developing OSs from scratch rather than just contributing to existing ones. And before you can do that you have to learn how to program, which is what the OP was asking about.

The OP's ambitions may be lofty, but let's not knock them down before he has even started. Start with the attitude that a task is just too difficult and you'll never even start on it. Every journey starts with a single step.

The truth is that, especially with the information available nowadays, these things are far easier than they may appear (although that doesn't mean that they are not extremely difficult). Forgive me if I misunderstood your meaning, but the description of such ambitions as "futile" seemed unequivocal to me.
 

TRENDING THREADS