Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

vageta

I have a question about C and C++

This topic is 6796 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have started learning how to program in C with the intenet to eventually create games. I am undertanding it all quite well, and I intend to move to C++ once I am able to use C proficiently. I wanted to know if starting in C was a good idea, or should have I started in C++? And Is the transition from C to C++ difficult, or are a lot of the fundementals basiclly the same?

Share this post


Link to post
Share on other sites
Advertisement
Well, C++ is based on C, so starting in C is a good idea.
C++ is more OOP than C, so C++ is used for Windows.

The transition from C to C++ is, in general, NOT HARD, and if you understand C well, C++ should almost be a breeze.

Share this post


Link to post
Share on other sites
The biggest problems C people who are making the transition to C++ is, thinking in terms of objects.



ECKILLER

Share this post


Link to post
Share on other sites
Well that''s a relif.
I was beginning to think that maybe starting in C wasn''t such a good idea.
I know that C is used for DOS and that C++ is used for Windows, so I though that since DOS isn''t really a major gaming platform any more it was a bad idea to start there.








Share this post


Link to post
Share on other sites
My move from c to c++ was basically this:

ren *.c *.cpp

In other words, you don''t have to un-learn anything, just learn some new concepts. After that, you become a bitch to the C++ language, and will never again - and I mean never - want to use straight C again. At least in my case.

Pythius

"You know you''re game''s in trouble when marketing throws a company party celebrating the release of beta, and it''s a complete suprise to the development team."

Share this post


Link to post
Share on other sites
I might actually suggest learning Java before c++. It forces you into OO techniques, and makes the differences between c and c++ obvious.

Mike

Share this post


Link to post
Share on other sites
quote:
Original post by vageta

Well that''s a relif.
I was beginning to think that maybe starting in C wasn''t such a good idea.
I know that C is used for DOS and that C++ is used for Windows, so I though that since DOS isn''t really a major gaming platform any more it was a bad idea to start there.




Choice of platform is usually independant of choice of programming language. You can write DOS programs in both C and C++. You can write Windows programs, including DirectX games (at least with DX7, don''t know about earlier) using both C and C++.

Only platform that I know of that really requires a particular language is BeOS, which requires C++ (unless you''re doing simple Unix-like command-line apps, in which case C works fine, IIRC).


---- --- -- -
Blue programmer needs food badly. Blue programmer is about to die!

Share this post


Link to post
Share on other sites
Actually, moss, no platform inherantly requires any specific language. All programming languages get translated to machine code anyway, so you can use whatever language you want on whatever platform you want as long as you have a compiler, interpreter, or assembler for the language you are using. As long as you have a program to convert the code in whatever language to assembly and machine code, you can use whatever language you want.

------------------------------
Jonathan Little
invader@hushmail.com
http://www.crosswinds.net/~uselessknowledge

Share this post


Link to post
Share on other sites
Win32 Was made with C in mind, so making application in Windows with C should no problem. COM application (eg. DirectX) is more OO, but it is no problem using COM with C.
I am programming Windows, both Win32 and DirectX, with assembly without any problems...just to point out that it really don''t matters which language you are using.

Share this post


Link to post
Share on other sites
quote:
Original post by Qoy
Actually, moss, no platform inherantly requires any specific language. All programming languages get translated to machine code anyway, so you can use whatever language you want on whatever platform you want as long as you have a compiler, interpreter, or assembler for the language you are using. As long as you have a program to convert the code in whatever language to assembly and machine code, you can use whatever language you want.



Yes, a very obvious answer. But I''d rather answer the question from the frame most people will use; that is, using standard programming tools, languages, environments, APIs etc. In that situation, most systems still do not place any requirements on choice of language, although BeOS does make it a little more difficult in certain respects.

I have nothing against the BeOS. I''m a registered developer, have a dual-66 BeBox, and have friends both within and without Be. It''s a decent system. But I don''t waste my time programming in machine instructions. So I use solely C++ on BeOS.



---- --- -- -
Blue programmer needs food badly. Blue programmer is about to die!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!