473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

What are the differences between C and C++ (besides OOP)

YarrOfDoom
1,247 Expert 1GB
A bit more specific: which one is fastest, and which one give you the most control over your computer? And why is this? Other differences are fine also.

Yarr
Dec 22 '07 #1
3 1447
weaknessforcats
9,208 Expert Mod 8TB
What C++ has that C doesn't:
1) member functions - remember you can use these with structs
2) automatic initialization and cleanup
3) function overloading
4) operator overloading
5) inline functions
6) templates
7) much tighter const rules
8) less dangerous typecasts
9) exception handling
10) Run-time type identification
11) namespaces
12) conversion operators
13) memory mangement with automatic initialization
14) scope resolution operator
15) The C++ Standard Template Library

None of the above have anything to do with OOP.

Generally, C++ is faster than C. I know it sounds like a hand-crafted C whiz-bang would be faster than code generated by a C++ compiler but this usually not true.

Remember, if you need it truly fast you just invoke the inline assembler and put your assembly code right in your C++ program. Now you can write your assembly instructions each by one.

Finally, keep in mind that a lrage part of C and the C libraries are deprecated in C++ because of the extreme danger they pose to crashing your code or making it accessible to viruses.
Dec 22 '07 #2
BigDaddyLH
1,216 Expert 1GB
And how meaningful is the question "what language is the fastest"? Very often, that is a matter of program design. (I'm a Java programmer, so I would say that, eh?)
Dec 23 '07 #3
drhowarddrfine
7,435 Expert 4TB
Generally, C++ is faster than C.
That's the first time I've heard that. Not that I've been tracking this or anything.
Now you can write your assembly instructions each by one.
Everything should be done in assembly.
Dec 27 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: Eakin, W | last post by:
Unlike a coding question, which may have a definite answer, this deals more with opinion. As I continue my studies of PHP and MySQL, and get to the point of being able to use them in a work...
28
by: David MacQuigg | last post by:
I'm concerned that with all the focus on obj$func binding, &closures, and other not-so-pretty details of Prothon, that we are missing what is really good - the simplification of classes. There are...
24
by: Xah Lee | last post by:
in computer languages, often a function definition looks like this: subroutine f (x1, x2, ...) { variables ... do this or that } in advanced languages such as LISP family, it is not uncommon...
56
by: Xah Lee | last post by:
What are OOP's Jargons and Complexities Xah Lee, 20050128 The Rise of Classes, Methods, Objects In computer languages, often a function definition looks like this: subroutine f (x1, x2, ...)...
2
by: Daniel | last post by:
Hi, Are there any differences between C# and VB.Net besides syntax? Performance-wise, how do they compare? Thanks, Dan
13
by: SailFL | last post by:
I have read threads here and there and I have looked at MS but I can not get a clear understanding of what .Net acutally is. I understand that C++ and Vb and other languages are being out a .Net. ...
12
by: Jason Curl | last post by:
Hello, Just a clarification of the specification about the C-Standard's interpretation of pointers. I know that 'char *' and 'void *' are equivalent and that 'int *' may be different in...
2
by: Javier | last post by:
Hi, I have just read that struct's in C++ can have public and private members, so I have one question: Which are the differences between classes and structs (besides constructors and...
13
by: Hussein B | last post by:
Hi, I'm familiar with static method concept, but what is the class method? how it does differ from static method? when to use it? -- class M: def method(cls, x): pass method =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.