-
19th April 2010, 01:32 AM
#1
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.
-
19th April 2010, 01:27 PM
#2
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.
-
19th April 2010, 03:39 PM
#3
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.
-
19th April 2010, 04:24 PM
#4
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.
-
19th April 2010, 05:08 PM
#5
Re: Would C++ be my right choice ?
Originally Posted by
stevea
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 ----------
Originally Posted by
fpmurphy
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 ----------
Originally Posted by
Simian Man
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
-
25th April 2010, 09:02 AM
#6
Re: Would C++ be my right choice ?
Originally Posted by
stevea
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.
Originally Posted by
fpmurphy
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.
Similar Threads
-
By Bana in forum Programming & Packaging
Replies: 35
Last Post: 10th October 2010, 05:57 AM
-
By elf_aka in forum Fedora Focus
Replies: 31
Last Post: 8th May 2008, 10:01 PM
-
By hermouche in forum Hardware
Replies: 0
Last Post: 10th February 2007, 04:14 PM
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
[[template footer(Guest)]]