C++ Or C - Whats is to beter?

Pages: 1, 2, 3
free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > C/C++ Programming

C++ Or C - Whats is to beter?

dexter
Someone said C++ is just an everyday language. That's not actually true. C++ is an extension of C, and it's biggest addition is object orientation... that does not mean that C++ is not a systems language. I think you'll find that the reason why most system programming is done in C is because there's still a lot of old-school programmers who just can't get their heads around the object-orientation paradigm.

For instance, I see "C++ programmers" still using C's printf() and other formatting functions and claim that it is superior to C++ iostream classes. With a bit of work, C++'s standard I/O can be used far more effectively than C's standard I/O... IMO.

Yet, that said, I'd still not say that C is worthless, quite the opposite, actually. It still has its uses just as every language does.

Reply

osknockout
And the person that said C++ is an everyday language is me...
Well, I mean it in several ways. You could show C++ code to a
computer illiterate and C code and see which makes more sense.
But most people I know program in C++ as much as possible.

CODE

#include<iostream>
typecast googleit
{
volatile int x = 1;
bool y(int z)
{ return !z;  //ok, !z I'm not sure you can return...}
}

int main()
{
std::cout << "enabling sequence...." << end1;
std::cout << "sequence aborted!" << end1;
std::cout << "error" << googleit::y(googleit::x);
return -1;
}

CODE

#include <stdio>
int volatile x = 1;
int function(int z)
{  return !z;}
int main()
{
printf("enabling sequence...\n");
printf("sequence aborted!\n");
printf("error\n");   //ok I admit my memory of C is a bit shabby
printf(y(x));
printf("\n");
return -1;
}

 

 

 


Reply

dexter
tongue.gif I see what you mean.... when I thought "every day language", I started thinking of C++ being compared as being like VB... dry.gif (my brain it burns at the thought... blink.gif )

With the amount of C code out there, though, I really need to get around and actually learn what half of it does... as much as C++ is supposed to be born and bred from C, they still look soooo different.

Reply

osknockout
C++ ~= VB?! blink.gif Of course not.
Good luck with your great crusade to understand
all that C code. I've tried...and went back to relearning
C.

Reply

bizchina
QUOTE(apache @ Nov 25 2004, 06:57 AM)
Wats the program is beter?

C++

C
*



Its like apples and oranges. If you are really thirsty - or need vitamin C then orange is probably better. So - you have to think about what you want to do? If you really want to produce stuff quickly ( for windows ) then I think you would be better using Delph - its supberb and its really quick to learn and fast to use. C is much easier than C++ since its not object orientated - but object is only useful if you really sit down and plan your applicaiton carefully.

Reply

hulunes
um,what u said above were too good...lol:

as a college student for software designing ,i think that acctully u are not supposed to compare them C and C++.if you learn C programing language well,u could master other pc language like C++ ,java,vitual basic,C# ...as soon as well.that is to say,C is the base.hope you have a good plan to study pc language.

Reply

dexter
Pffft... you're never going to find two experts who agree... Java and C# are very similar to C++, in that they're both derivations of and both contain OO (object-orientated) aspects... I don't know VB well, but I think it may as well... basically, what I'm trying to say is that although some see C as a better starting language because its the base to all of them, others see C++ as a better starting language because OO is introduced almost immediately (and thereby, easier to shift to other common languages like Java and C# which also use OO)...

...basically look at both sides and choose what you feel will suit you best...

Reply

switch
ok, my view is because C++ is back compatible, it can do all the standard c stuff right? so in that sense, C++ can do all C can do and more! therefore, C++ seems better to me. Hey, and who wouldn't want a programming language with ++ on the end of it? it just sounds so cool!

Besides the fact i find classes and inheritance and stuff really useful tongue.gif

Reply

osknockout
QUOTE
ok, my view is because C++ is back compatible, it can do all the standard c stuff right? so in that sense, C++ can do all C can do and more! therefore, C++ seems better to me. Hey, and who wouldn't want a programming language with ++ on the end of it? it just sounds so cool!

Besides the fact i find classes and inheritance and stuff really useful


Ha. Not exactly. You can't truly printf(#WHAT_AN_IGNORAMUS) In C++
because std is a template.

if you think about it, OO is not necessary and can be quite mindbreaking
at times. Try combining that, exception handling, and inline assembly.

CODE

//The Universe in C++ made and written by Adonai-Adonai God
// copyright the beginning of the world, all judgement reserved.

try{ run_world(-10,000)  //don't worry, evolutionists will never know...
if( (check_alive(Adam) && check_alive(Eve)!=TRUE)
throw{ "no_humans"} }}

catch( char * str )
{
std::cout << "I'm sorry God, my infinite master, but you have made an error:"
<< end1 << "...there are no humans my lordship." << end1;

//I? error?

petrify_world();                        //no such thing as an error if I say so!
_inline{ mov cs, [0x00h] }        //and I shall make all things anew...
}

Reply

Clan-Fade
QUOTE(apache @ Nov 24 2004, 09:57 PM)
Wats the program is beter?

C++

C
*



I do know what the difference is why r there so many languages

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Pages: 1, 2, 3
Similar Topics

Keywords : whats beter

  1. Crashing Command Interpretrer - What's wrong with this thing? (2)



Looking for c, c, whats, beter

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for c, c, whats, beter

*MORE FROM TRAP17.COM*
advertisement



C++ Or C - Whats is to beter?



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE