Thread: I am new to C,C++

  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    2

    I am new to C,C++

    Hi. I am new to C and C++ languages. One thing I wanted to find out is what is the major differences between C and C++?? The answer I found so far doesnt really make a clear picture to me.
    Second thing is if I develop using Microsoft Visual C++ environment, am I be able to write programs for C or C++?

    Please Advice.

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  3. #3
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    If you are new to both languages the whole theme of knowing the differences between them will look like sanscrit to you.

    Regardless, you may want to check wikipedia for both languages. Shortly, C++ builds on C to provide a more modern programming language based on Object Oriented Programming and Generic Programming, not disposing of the Procedural Programming method of whih C is based.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  4. #4
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    Second thing is if I develop using Microsoft Visual C++ environment, am I be able to write programs for C or C++?
    For both.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  5. #5
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    - C++ is meant to be the "new and improved C". If you know what the '++' operator does in C/C++... that's the idea.

    - The biggest difference, of course, is that C++ is Object Oriented, and C is not. If you are new to programing, that won't mean anything to you. You can use the C++ language to write a program that is not object oriented. For example, Hello World is not object oriented. (The first difference you might notice, is that there is no cout in C.)

    - C is (mostly) a subset of C++. Most C code is also valid C++ code. You can paste C code into your C++ program, and it will (usually) compile and work. You can complie C on a C++ compiler. The standard C libraries are included in C++.

    - There is no need to learn C before learning C++. If you learn everything about the C++ language, you know all about about C, except that you might have to look-up it's limitations. (Very few poople know everything about C++.)

    -C is (almost) never used for general-purpose programing anymore. (I don't think you can buy a C-only compiller for a PC or MAC, although you can probably find a free one.) It is still used to write firmwarefor some embedded systems, sometimes to write device drivers, and for some and other special situations.
    Last edited by DougDbug; 08-02-2006 at 03:00 PM.

Popular pages Recent additions subscribe to a feed