Jump to content


Difference b/w c++,c++ II ,ansi c


5 replies to this topic

#1 Usmanbinzahid

    New Member

  • Members
  • Pip
  • 1 posts

Posted 19 October 2011 - 10:24 AM

hello guys
kindly tel me that what is the basic difference b/w c++ ,c++ II & ansi c
if someone can just name the difference between all these then it will be helpful for me
so kindly help me out guys

#2 .oisyn

    DevMaster Staff

  • Moderators
  • 1822 posts

Posted 19 October 2011 - 11:49 AM

I don't know what b/w c++ and c++ II are. Ansi C is the standard C language, and is not even C++.
C++ addict
-
Currently working on: the 3D engine for Tomb Raider.

#3 geon

    Senior Member

  • Members
  • PipPipPipPip
  • 891 posts

Posted 19 October 2011 - 03:17 PM

Ansi C is a very small (as in few features) and simple language.

C++ is basically C with classes, tempates and a few other features added/shoehorned in.

There is nothing (well known) called C++ II. I'm guessing you mean C++11 (or C++0x), which is the latest revision of the C++ standard, adding some more features.

#4 alphadog

    DevMaster Staff

  • Moderators
  • 1643 posts

Posted 19 October 2011 - 08:29 PM

ANSI C is a dialect/variant of the general group of C languages.

C++ was initially C with additional constructs. Now, it's more its own language.

C++ II doesn't exist.

For more, try Wikipedia...
Hyperbole is, like, the absolute best, most wonderful thing ever! However, you'd be an idiot to not think dogmatism is always bad.

#5 Xannon

    New Member

  • Members
  • Pip
  • 3 posts

Posted 09 December 2011 - 10:59 AM

Key Differences between ANSI C and C++

1. C is a procedural programming language (where as C++ is an Object
Oriented Programming language). This means that the C programming
language does not support classes and all functionality provided
directly or indirectly through classes. Therefore C does not support
inheritance, polymorphism or encapsulation of data. C does support
"struct"s, which are like classes without support for member functions
and with no ability to encapsulate the data members that are defined
as belonging to the struct (a struct is an ADT).

2. C does not have access to the iostream library. Input and output in
C is done using the stdio.h library which provides access to the
scanf() and printf() functions, used to do input and output
respectively.

3. C does not support exception handling.

4. C does not support templates.

5. C does not support namespaces.

6. C does not support references.

7. C does not support default parameter values.

8. C does not support overloaded function names.

9. C does not allow you to declare a variable in a for statement
header (but C99 does!).

10. C requires that all variables of block scope must be declared at
the beginning of the block (not the case with C99!).

11. C does not support the new and delete operators. Dynamic
variables are created using the malloc() and free() functions, as well
as the calloc() and realloc() functions.

#6 Matt-D

    New Member

  • Members
  • Pip
  • 1 posts

Posted 08 January 2012 - 09:31 PM

http://www.parashift....html#faq-38.12
That being said, it's a very old terminology, currently it's best to refer to the respective Standard version:
C++ -- http://en.wikipedia....Standardization
C -- http://en.wikipedia....ory_and_outlook

If you want to read more about the ancient history, this is a good read (by Bjarne himself):
http://www2.research...m/~bs/hopl2.pdf





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users