Skip to main content
fixed links
Source Link
Deduplicator
  • 9.3k
  • 5
  • 33
  • 53

Stroustrup himself answers that in his FAQhis FAQ:

C++ is a direct descendant of C that retains almost all of C as a subset. C++ provides stronger type checking than C and directly supports a wider range of programming styles than C. C++ is "a better C" in the sense that it supports the styles of programming done using C with better type checking and more notational support (without loss of efficiency). In the same sense, ANSI C is a better C than K&R C. In addition, C++ supports data abstraction, object-oriented programming, and generic programming.

It's support for object-oriented programming and generic programming that make C++ "completely different" to C. You can almost write pure C and then compile it with a C++ compiler (as long as you take care of the stricter type checking). But then you're still writing C - you're not writing C++.

If you're writing C++, then you're making use of it's object-oriented and template features and that's nothing like what you would see in C.

Stroustrup himself answers that in his FAQ:

C++ is a direct descendant of C that retains almost all of C as a subset. C++ provides stronger type checking than C and directly supports a wider range of programming styles than C. C++ is "a better C" in the sense that it supports the styles of programming done using C with better type checking and more notational support (without loss of efficiency). In the same sense, ANSI C is a better C than K&R C. In addition, C++ supports data abstraction, object-oriented programming, and generic programming.

It's support for object-oriented programming and generic programming that make C++ "completely different" to C. You can almost write pure C and then compile it with a C++ compiler (as long as you take care of the stricter type checking). But then you're still writing C - you're not writing C++.

If you're writing C++, then you're making use of it's object-oriented and template features and that's nothing like what you would see in C.

Stroustrup himself answers that in his FAQ:

C++ is a direct descendant of C that retains almost all of C as a subset. C++ provides stronger type checking than C and directly supports a wider range of programming styles than C. C++ is "a better C" in the sense that it supports the styles of programming done using C with better type checking and more notational support (without loss of efficiency). In the same sense, ANSI C is a better C than K&R C. In addition, C++ supports data abstraction, object-oriented programming, and generic programming.

It's support for object-oriented programming and generic programming that make C++ "completely different" to C. You can almost write pure C and then compile it with a C++ compiler (as long as you take care of the stricter type checking). But then you're still writing C - you're not writing C++.

If you're writing C++, then you're making use of it's object-oriented and template features and that's nothing like what you would see in C.

typo
Source Link
Dean Harding
  • 19.9k
  • 3
  • 54
  • 70

Stroustrup himself answers that in his FAQ:

C++ is a direct descendant of C that retains almost all of C as a subset. C++ provides stronger type checking than C and directly supports a wider range of programming styles than C. C++ is "a better C" in the sense that it supports the styles of programming done using C with better type checking and more notational support (without loss of efficiency). In the same sense, ANSI C is a better C than K&R C. In addition, C++ supports data abstraction, object-oriented programming, and generic programming.

It's support for object-oriented programming and generic programming that make C++ "completely different" to C. You can almost write pure C and then compile it with a C++ compiler (as long as you take care of the stricter type checking). But then you're still writing C - you're not writing C++.

If you're writing C++, then you're making use of it's object-orientoriented and template features and that's nothing like what you would see in C.

Stroustrup himself answers that in his FAQ:

C++ is a direct descendant of C that retains almost all of C as a subset. C++ provides stronger type checking than C and directly supports a wider range of programming styles than C. C++ is "a better C" in the sense that it supports the styles of programming done using C with better type checking and more notational support (without loss of efficiency). In the same sense, ANSI C is a better C than K&R C. In addition, C++ supports data abstraction, object-oriented programming, and generic programming.

It's support for object-oriented programming and generic programming that make C++ "completely different" to C. You can almost write pure C and then compile it with a C++ compiler (as long as you take care of the stricter type checking). But then you're still writing C - you're not writing C++.

If you're writing C++, then you're making use of it's object-orient and template features and that's nothing like what you would see in C.

Stroustrup himself answers that in his FAQ:

C++ is a direct descendant of C that retains almost all of C as a subset. C++ provides stronger type checking than C and directly supports a wider range of programming styles than C. C++ is "a better C" in the sense that it supports the styles of programming done using C with better type checking and more notational support (without loss of efficiency). In the same sense, ANSI C is a better C than K&R C. In addition, C++ supports data abstraction, object-oriented programming, and generic programming.

It's support for object-oriented programming and generic programming that make C++ "completely different" to C. You can almost write pure C and then compile it with a C++ compiler (as long as you take care of the stricter type checking). But then you're still writing C - you're not writing C++.

If you're writing C++, then you're making use of it's object-oriented and template features and that's nothing like what you would see in C.

Source Link
Dean Harding
  • 19.9k
  • 3
  • 54
  • 70

Stroustrup himself answers that in his FAQ:

C++ is a direct descendant of C that retains almost all of C as a subset. C++ provides stronger type checking than C and directly supports a wider range of programming styles than C. C++ is "a better C" in the sense that it supports the styles of programming done using C with better type checking and more notational support (without loss of efficiency). In the same sense, ANSI C is a better C than K&R C. In addition, C++ supports data abstraction, object-oriented programming, and generic programming.

It's support for object-oriented programming and generic programming that make C++ "completely different" to C. You can almost write pure C and then compile it with a C++ compiler (as long as you take care of the stricter type checking). But then you're still writing C - you're not writing C++.

If you're writing C++, then you're making use of it's object-orient and template features and that's nothing like what you would see in C.