Fedora Linux Support Community & Resources Center
  #1  
Old 19th April 2010, 01:32 AM
satimis Offline
Registered User
 
Join Date: Jul 2004
Posts: 1,386
linuxubuntufirefox
Would C++ be my right choice ?

Hi folks,

C++ and Java are platform independent. It is for sure. Java is a resource hog. The learning curve of C++ is quite steep at start. What I'm going to use C++ is to build a platform independent software with sound and graphic integrated as well interactive. Would C++ be the right choice for me? Any other suggestion? TIA

Edit:

I have separate data (.dat), sound (.wav) and graphics (.gif) files. I wonder whether I have to compile sound and graphic files on the software. I won't compile data file on software. It should be retained separately.

B.R.
satimis

Last edited by satimis; 19th April 2010 at 03:36 AM.
Reply With Quote
  #2  
Old 19th April 2010, 01:27 PM
stevea's Avatar
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,346
linuxfedorafirefox
Re: Would C++ be my right choice ?

C++ & Java aren't very different syntactically, tho' C++ certainly has more features esp the pointer legacy stuff.
OTOH the portability of these two languages is very different. The source is fairly portable, but only Java produces really portable "binary".

You need to read up on your options and the differences.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
  #3  
Old 19th April 2010, 03:39 PM
fpmurphy Offline
Registered User
 
Join Date: May 2009
Location: /dev/ph
Posts: 308
windows_vistafirefox
Re: Would C++ be my right choice ?

You state that you want to build "platform independent software with sound and graphic integrated." Sound and graphics are generally not platform agnostic.
Reply With Quote
  #4  
Old 19th April 2010, 04:24 PM
Simian Man's Avatar
Simian Man Offline
Registered User
 
Join Date: Sep 2008
Location: Tallahassee
Age: 28
Posts: 336
linuxfedorafirefox
Re: Would C++ be my right choice ?

For platform independence, the libraries you choose are much more important than the languages. For multimedia applications I recommend using SDL which provides platform independent windowing, sound, input and 2D graphics. It also provides an OpenGL context should you need 3D graphics. Moreover the library is one of the simplest and best designed APIs I have ever worked with.

You can program with SDL in a lot of different languages including C++ and Java.
Reply With Quote
  #5  
Old 19th April 2010, 05:08 PM
satimis Offline
Registered User
 
Join Date: Jul 2004
Posts: 1,386
linuxdebianmozilla
Re: Would C++ be my right choice ?

Quote:
Originally Posted by stevea View Post
C++ & Java aren't very different syntactically, tho' C++ certainly has more features esp the pointer legacy stuff.
Hi stevea,

Thanks for your advice.

Since I have spent couple days searching stuffs to learn C++ and already starting learning it for 3 days. Now I have a collection of stuffs for its learning. I'll start to searching stuffs on leaning Java.

A further thought if Java and C++ & aren't very different syntactically. Can I learn them simultaneously? Would it be a crazy idea?

Others noted and thanks.

B.R.
satimis

---------- Post added at 12:04 AM CDT ---------- Previous post was at 12:03 AM CDT ----------

Quote:
Originally Posted by fpmurphy View Post
You state that you want to build "platform independent software with sound and graphic integrated." Sound and graphics are generally not platform agnostic.
Noted and thanks

satimis

---------- Post added at 12:08 AM CDT ---------- Previous post was at 12:04 AM CDT ----------

Quote:
Originally Posted by Simian Man View Post
For platform independence, the libraries you choose are much more important than the languages. For multimedia applications I recommend using SDL which provides platform independent windowing, sound, input and 2D graphics. It also provides an OpenGL context should you need 3D graphics. Moreover the library is one of the simplest and best designed APIs I have ever worked with.

You can program with SDL in a lot of different languages including C++ and Java.
Hi Simian,

Thanks for your advice.

I won't build 3-D graphic only 2-D

satimis
Reply With Quote
  #6  
Old 25th April 2010, 09:02 AM
NatLWalker Offline
Registered User
 
Join Date: Jan 2007
Location: Louisiana
Age: 30
Posts: 104
windows_vistaie
Re: Would C++ be my right choice ?

Quote:
Originally Posted by stevea View Post
C++ & Java aren't very different syntactically, tho' C++ certainly has more features esp the pointer legacy stuff.
OTOH the portability of these two languages is very different. The source is fairly portable, but only Java produces really portable "binary".

You need to read up on your options and the differences.
Pointers and manual memory management aren't legacy stuff. They're necessary for systems-level development, something C/C++ quite adept at - and something managed languages fail miserably at doing. There are safe Native languages like Ada for those who want extremely robust system with Native Code Execution speed.

C++ Code is portable if you use the same compiler. Aside from that, you have to be very careful with how you code, because C compilers are notorious for having their own little "extras" which are so convenient that developers can't help but use them.

Generally, the OS vendor will have a better C++ compiler than the alternatives. Sun Studio on Solaris, Visual Studio on Windows, and HP's C++ compiler on HP-UX are all better C/C++ compilers than GCC. The benefit of GCC is that you don't have to worry about the quirks of several compilers, and can disregard GCC's because it runs on all of those platforms, anyways...

Managed Languages and their Libraries (specifically .NET and Java) provide powerful abstractions, so you can usually move from one platform to the next without fear of incompatibilities and requiring few source changes - provided you aren't using platform-independent libraries. C# and .NET and cross-platform. The Libraries (WinForms, WPF, WCF, etc.)... Not so much.

Quote:
Originally Posted by fpmurphy View Post
You state that you want to build "platform independent software with sound and graphic integrated." Sound and graphics are generally not platform agnostic.
They are platform agnostic if you can find a suitable abstraction supported by the systems you wish to target. The issue with Sound and Graphics isn't the platform (as in OS or Processor Architecture), but the actual Sound and Graphics hardware. You never know if the hardware anyone uses to run your software will actually support the API calls you use. Linux users are notorious for using recycled software.

You might develop on a system with recent model SoundBlaster Gaming Card and a GeForce 9800, but someone may run your software on system with a built-in sound card and a Radeon 9200 SE on a system that otherwise runs flawlessly.

Cause we should all have to upgrade hardware to run general-purpose end-user software, right?

EDIT: Also, learning the syntax of a language is easy (couple weeks, a month at the most for a reasonably and honestly interested person). Learning how to code to the point that you can productively churn out code is not. That can take several months or longer, and you should get ahold of some good books. Most online tutorials are terrible. MSDn is also a good, searchable, reference... Sun also has excellent documentation. You may want something more specific to the GCC toolchain, though.

And do learn how to use a debugger (like GDB) :P

Last edited by NatLWalker; 25th April 2010 at 09:07 AM.
Reply With Quote
Reply

Tags
choice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Choice of C++ IDE? Bana Programming & Packaging 35 10th October 2010 05:57 AM
choice elf_aka Fedora Focus 31 8th May 2008 10:01 PM
need choice help! hermouche Hardware & Laptops 0 10th February 2007 03:14 PM


Current GMT-time: 04:14 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat