apache 0 Report post Posted November 25, 2004 Wats the program is beter?C++C Share this post Link to post Share on other sites
tmonty 0 Report post Posted November 25, 2004 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. Share this post Link to post Share on other sites
apache 0 Report post Posted November 25, 2004 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. Share this post Link to post Share on other sites
Darth Vivi 0 Report post Posted November 26, 2004 The only people that prefer C are those that don't want to make the change from C to C++. Share this post Link to post Share on other sites
s243a 0 Report post Posted December 11, 2004 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 doesnt 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? Arent 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.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 Share this post Link to post Share on other sites
mizako 0 Report post Posted December 13, 2004 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. Share this post Link to post Share on other sites
osknockout 0 Report post Posted December 19, 2004 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 everyonea bit more peace of mind. Personally I've seen C programs runfaster and smaller than C++ programs, but that's because C's moresystem oriented. Personally, I prefer C++. I'd use assembly ratherthan C nowadays. Share this post Link to post Share on other sites
s243a 0 Report post Posted December 19, 2004 I'd use assembly ratherthan 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. Share this post Link to post Share on other sites
nancmu 0 Report post Posted December 20, 2004 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... Anyways!! my C complier has more bugs!! , I don't know how i can fix it. I must change!!! Share this post Link to post Share on other sites
osknockout 0 Report post Posted December 20, 2004 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? Share this post Link to post Share on other sites
dexter 0 Report post Posted December 24, 2004 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. Share this post Link to post Share on other sites
osknockout 0 Report post Posted December 24, 2004 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 acomputer illiterate and C code and see which makes more sense.But most people I know program in C++ as much as possible. [/br]#include<iostream>[br]typecast googleit[/br]{[br] volatile int x = 1;[/br] bool y(int z)[br] { return !z; //ok, !z I'm not sure you can return...}[/br]}[br][/br]int main()[br]{[/br] std::cout << "enabling sequence...." << end1;[br] std::cout << "sequence aborted!" << end1;[/br] std::cout << "error" << googleit::y(googleit::x);[br] return -1;[/br]}[br] [br]#include <stdio>[/br]int volatile x = 1;[br]int function(int z)[/br] { return !z;}[br]int main()[br]{[/br]printf("enabling sequence...\n");[/br]printf("sequence aborted!\n");[br]printf("error\n"); //ok I admit my memory of C is a bit shabby[/br]printf(y(x));[br]printf("\n");[/br]return -1;[br]}[/br] Share this post Link to post Share on other sites
dexter 0 Report post Posted December 24, 2004 I see what you mean.... when I thought "every day language", I started thinking of C++ being compared as being like VB... (my brain it burns at the thought... )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. Share this post Link to post Share on other sites
osknockout 0 Report post Posted December 25, 2004 C++ ~= VB?! Of course not.Good luck with your great crusade to understandall that C code. I've tried...and went back to relearningC. Share this post Link to post Share on other sites
bizchina 0 Report post Posted December 30, 2004 Wats the program is beter? C++ C <{POST_SNAPBACK}> 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. Share this post Link to post Share on other sites