-
Oct 8th, 2014, 04:36 AM
#1
Thread Starter
New Member
Advantages of C++
Hi every one, Can any one tell me some advantages of C++ rather than C language..
-
Oct 8th, 2014, 06:42 AM
#2
Re: Advantages of C++
I've moved your thread to the C and C++ section. The code bank is for posting code snippets and examples so you probably wouldn't have got many responses in there.
The best argument against democracy is a five minute conversation with the average voter - Winston Churchill
Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd
-
Oct 9th, 2014, 04:09 AM
#3
Re: Advantages of C++
I'm no C++ expert or experienced one. However, based on my understanding C++ supports Object Oriented Programming while C doesn't.
KGC
-
Oct 15th, 2014, 07:04 PM
#4
Re: Advantages of C++
Here's my list from my experience:
1. OOP
2. Smart pointers & RAII with the STL
3. Templates (Macro's in C can be harder to deal with)
4. Better type safety
5. References
That's a good starting list.
<<<------------
.NET Programming (2012 - 2018)
®Crestron - DMC-T Certified Programmer | Software Developer <<<------------
-
Oct 16th, 2014, 06:36 AM
#5
Re: Advantages of C++
- classes (OOP)
- templates
- exceptions
- containers (lists, maps, vectors, sets etc)
- iterators
- i/o streams
- operator overloading
- function overloading
- algorithms (sort, merge, search etc)
- strings
- multi-threading (C++11)
- references
- improved type safety
- Lambda Expressions (C++11)
- Regular Expressions
- rvalue references
.
.
.
All advice is offered in good faith only. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
Oct 16th, 2014, 07:22 PM
#6
Re: Advantages of C++
 Originally Posted by 2kaud
- classes (OOP)
- templates
- exceptions
- containers (lists, maps, vectors, sets etc)
- iterators
- i/o streams
- operator overloading
- function overloading
- algorithms (sort, merge, search etc)
- strings
- multi-threading (C++11)
- references
- improved type safety
- Lambda Expressions (C++11)
- Regular Expressions
- rvalue references
.
.
.
I'm curious on clarification of the highlighted parts above? C has sorting algorithms (http://www.cplusplus.com/reference/cstdlib/qsort/). But the I/O objects std::cout, etc.. for C++ are all synchronized with stdin, stdout, stderr, used by C. There's definitely a lot I missed, yet I have a biased view since I use C++ more than I use C... C++ I/O is subjective however. This is because C style I/O can integrate more easily with localisation, as the whole string to localise is not broken up in smaller strings as with C++ I/O stream objects, and with some strategies, the localizer can reorder the order of the inserted value, move them around in the string, etc... In some cases, because it's less bulky too, C I/O is faster than a standard C++ I/O implementation. You can also still multi-thread in C; it is possible.
Last edited by AceInfinity; Oct 16th, 2014 at 07:29 PM.
<<<------------
.NET Programming (2012 - 2018)
®Crestron - DMC-T Certified Programmer | Software Developer <<<------------
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
|
Click Here to Expand Forum to Full Width
|