also @ TechSpot: Nortel's internal network "owned" by hackers for almost a decade
Welcome to the TechSpot OpenBoards. Please read the FAQ if you have any questions. Sign up or Login to participate.

Go Back   TechSpot OpenBoards > TechSpot Community > General Discussion

Collaborate in the cloud with Office, Exchange, SharePoint, and Lync

Difference between C and C++

Reply
Thread Tools Search this Thread
  #1  
Old 12-17-2008
TechSpot Member
 
Location: Biloela, Australia
Member since: Dec 2008, 40 posts
System specs
Difference between C and C++

I was not sure where to put this so forgive me if it belongs elsewhere.

I would really like to know because I wouldn't mind learning one. If you could recommend one to learn that would be great too. I hear its similar to Java which I learned a tiny bit of last year.
  #2  
Old 12-17-2008
TechSpot Member
 
Member since: Feb 2008, 128 posts
Quote:
Originally Posted by CombinationZero View Post
I was not sure where to put this so forgive me if it belongs elsewhere.

I would really like to know because I wouldn't mind learning one. If you could recommend one to learn that would be great too. I hear its similar to Java which I learned a tiny bit of last year.
First of all, the (rather silly) operator joke goes that C++ is called "C++" and not "++C" because it runs slower, yet returns the same functionality...

On the surface, Java and C++ might look the same, but Java is much simpler, for three (main) reasons:
1) Java comes with extensive libraries which do almost anything you can wish for - And these are standard. C++ on the other hand has very little as far as standardization goes.
2) Java is platform independent, C++ is not.
3) Much is hidden from the programmer, such as memory management.

This is not to say Java is better than C++, or vice versa (anyone arguing either point is acting silly - both have their places).

C is the basis of C++, and serves as a good starting point to study the latter. Unlike Java, C is not an Object Oriented language, so writing in it is different and not tied to the class/object concept. I would recommend at least getting slightly acquainted with C before trying to learn C++, although it is not an absolute must and the two differ in their standard libraries, Input/Output concepts, memory allocation/deallocation and other things.
  #3  
Old 12-17-2008
TechSpot Member
 
Location: Biloela, Australia
Member since: Dec 2008, 40 posts
System specs
Thanks, That helped a bit as did the IRC channel
  #4  
Old 12-17-2008
TechSpot Booster
 
Location: Rhode Island
Member since: Mar 2007, 479 posts
FYI, another consideration is what you plan to use the code for. For example, it is very, very rare for an embedded systems programmer to use Java in an application due to higher overhead issues. They tend to use C or C++ to keep memory requirements as low as possible. Some times they still use BASIC for this reason. By the way, by "embedded systems" I am referring to code that doesn't run on a traditional computer, but is used in other electronic devices (e.g., automobiles, refrigerators, etc.)
  #5  
Old 12-17-2008
TechSpot Member
 
Member since: Feb 2008, 128 posts
Quote:
Originally Posted by NetCablesPlus View Post
FYI, another consideration is what you plan to use the code for. For example, it is very, very rare for an embedded systems programmer to use Java in an application due to higher overhead issues. They tend to use C or C++ to keep memory requirements as low as possible. Some times they still use BASIC for this reason. By the way, by "embedded systems" I am referring to code that doesn't run on a traditional computer, but is used in other electronic devices (e.g., automobiles, refrigerators, etc.)
I haven't heard of using basic for embedded applications, but Assembly coding is commonplace in the embedded world (like the coding I do at work, for example). Another reason why Java won't be used in many embedded systems is the fact that there is no JVM for most of the microcontroller architectures out there.

Last edited by direwolf007; 12-17-2008 at 07:18 PM..
  #6  
Old 12-17-2008
TechSpot Booster
 
Location: Rhode Island
Member since: Mar 2007, 479 posts
Oops...I meant Assembly...wrote BASIC...sorry...good catch direwolf...

About the JVM: I used to sell RTOes and TCP/IP stacks for 8-bit, 16-bit, and 32-bit processors. We looked into offering a JVM, but the overhead was too much for all but the largest 32-bitters.
  #7  
Old 12-21-2008
captaincranky's Avatar
TechSpot Evangelist
 
Member since: Oct 2006, 7,586 posts
I'm About to Make Mark Twain Proud........By Erasing All Doubt.....

I don't need to go into the whole quote, do I?

I thought that assembly code was processor specific. (!) or (?) (multiple choice) I distinctly remember not being able to program an Atari 1200 with it.

What does Python do? I always hear that name kicked around somewhere near Firefox.
Reply

Similar Topics
Topic Replies Forum
Difference between dvi and hd? 3 Audio and Video
What's the difference in RAM? 8 Overclocking, Cooling and Modding
AGP 8x vs 4x is there a big difference? 3 Audio and Video
What's the difference (P4)? 6 Processors and Motherboards
Difference between CAS 2.5 and 3?? 5 Processors and Motherboards

Thread Tools Search this Thread
Search this Thread:

Advanced Search
All times are GMT -4. The time now is 04:58 AM.