Jul 24, 2008

C++ Or C - Whats is to beter?

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > C/C++ Programming
Pages: 1, 2, 3

free web hosting

C++ Or C - Whats is to beter?

apache
Wats the program is beter?

C++

C

Reply

tmonty
C++ is continuation of C. C++ is object-oriented. In my opinion classes are very useful. Today C++ is using to develope many programs, but e.g. kernels are written in C.

I suggest using C++ then.

Reply

apache
I trying to got my c++ from my friend!
He's got this in last year. He borrow to my a C. It's realy bad. i'm not like the C but he like this.

Reply

Darth Vivi
The only people that prefer C are those that don't want to make the change from C to C++.

Reply

s243a
http://graham.main.nc.us/~bhammel/graham/C.htmlI agree that c++ has more features and in that since it is better however you can program in an object oriented style in c. True it doesn’t have classes but it has something called type definition and structures. You can implement methods by having fields in your structure that are pointers to void. You can implement subclasses by renaming an exciting type with a second type. Then you can override methods by changing the pointers. If you want to include new fields in the subclass then make sure there is a field in the original type called children. If you want to do multiple inheritance in c, which is legal in c++ but not java than the child would have to point to the parent instead of the parent pointing to the child. This will make polymorphism more difficult to handle. Anyway, anything that is legal in c is legal in c++ so it is not really hard to switch from c to c++. So why not switch? Aren’t more features better? Well it depends, not all processors have c++ compilers, c is a much smaller language, it is much easier to see what is going in at a low level with c then c++ because the translation from c to assembly is almost just a straight look up. Some programming environments that interface with hardware (ex. Lab windows) supports c and not c++. So if you know c you can use you code in more places but if you know c++ while your code will probably be easier to read. Take your pick.

QUOTE
The C Programming Language may have been one of the most elegant and beautiful computer languages ever devised; a personal opinion. I'm not sure how fond I am of the new ANSI standard for it. Let me describe the original C as designed by Ken Thompson and Dennis Ritchie.

From:
http://graham.main.nc.us/~bhammel/graham/C.html

 

 

 


Reply

mizako
The big step is to change the way of thinking. C++ forces to think you about the data the application is going to manage and C forces you to think about the goal to be achieved. A lot of people uses C++ as a C with more functionality. There is really few people who really use C++ in a pure oriented object way.

I think that C is really powerful but C++ is even more powerful. However a lot software development is made in C. Maybe because is easier to find C programmers than C++ programmers.

Reply

osknockout
I don't think you're right Darth Vivi. Microsoft sells Visual C++
and makes its OS mostly in C. But C is good in system programming,
and C++ for your everyday programming since it gives everyone
a bit more peace of mind. Personally I've seen C programs run
faster and smaller than C++ programs, but that's because C's more
system oriented. Personally, I prefer C++. I'd use assembly rather
than C nowadays.

Reply

s243a
QUOTE
I'd use assembly rather
than C nowadays.


Better control and more efficient but less portable. I think it would be better to write some libraries in assembler that take advantage of unique processor features and then call them from C or C++. You could even have a general C version of the libraries when you didn’t know what processor the code would be run on.

Reply

nancmu
I like C because it is the best way to learn other language..
C no more function - you can learn it by easy and can make some problem to clear (suitable for beginer).
C no strict - if you learn java or high language, you will known "how is strict ?".
and more... biggrin.gif

Anyways!! my C complier has more bugs!! blink.gif , I don't know how i can fix it.
I must change!!! mad.gif

Reply

osknockout
Hey nancmu, which C compiler do you use?
There are some assembly libraries out there,
but none which does what you want s243a,
after all, why sell out on assembly's good stuff? smile.gif

Reply

Latest Entries

osknockout
ClanFade, there are as many programming languages as
human points of view. There are so many because there
are different ways to think of programming.

C++ - more user oriented
C - more system oriented

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

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

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

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



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.
Confirm Code:

Pages: 1, 2, 3

Searching Video's for c, c, whats, beter
advertisement



C++ Or C - Whats is to beter?



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
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