| | |
C++ Vs Java
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: May 2007
Posts: 266
Reputation:
Solved Threads: 3
•
•
•
•
>If I were to make a career out of computer programming,
>which would be better to learn, Java or C/C++?
If you don't know C, I wouldn't hire you. Period. If you don't know Java or C++, whether I would hire you or not depends on the job. However, I would recommend learning all three, starting with C, then moving to C++, and finally Java.
Why? i know java and am learning c# and c++. but what is the point of C? what is so special about it that someone cant just learn c++ and use it for situations that also calls for C? are there really some programs that is best written in C? i have always been under the impression that games are the most difficult thing for a human to write as well as the most demanding thing for a computer to execute. so if games are written in C++ then what is the point of learning C?
Last edited by quintoncoert; Jul 10th, 2007 at 11:04 am.
You may opt for Java because its a new language that is yet to be developed instead of C or C++ . The latter have become full fledged,vast. There are thousands of sites which use java applets. Java is currently very popular , much more than the others.
For me Java was really easy to learn than C++. It had so nice sorting techniques , so lucid for anyone in my small view.
For me Java was really easy to learn than C++. It had so nice sorting techniques , so lucid for anyone in my small view.
Learning C++ is easy with Daniweb :)
•
•
•
•
@ narue unless of course someone else knows exactly what she means.
Why? i know java and am learning c# and c++. but what is the point of C? what is so special about it that someone cant just learn c++ and use it for situations that also calls for C? are there really some programs that is best written in C? i have always been under the impression that games are the most difficult thing for a human to write as well as the most demanding thing for a computer to execute. so if games are written in C++ then what is the point of learning C?
Learning C teaches responsibility in coding as it can be considerably more hazardous to your computer if you write shoddy code. While C++ may be safer and easier to use for application development, C is still the more powerful tool for many applications.
•
•
Join Date: May 2007
Posts: 266
Reputation:
Solved Threads: 3
@ thegathering or narue or anyone else who knows.
i have gone on the internet and have seen that C is used primarily for system programing since it can access hardware addresses directly. i am a bit confused between what it can do and what c++ can do with memory addresses.
i know that a pointer in C++ can alter the value of a variable and how it does this. i assume that c also has that ability. but what i dont know is if C++ can directly access a memory location if that memory location is not assigned to a variable. i suppose that C can. in the light of that am i correct to assume that C can do things such as send a group of bites to lets say a printer port or a graphics card but that C++ cannot do that directly? (i.e. the only way c++ can do that is via a library written in C)
i originally thought that C was an outdated language and that C++ can do everything that it can do plus it can do object oriented as well. i just thought that learning C would be a waste of time since C++ includes C functionality as well. but that still does not explain why she would not hire someone who dont know C?
i have gone on the internet and have seen that C is used primarily for system programing since it can access hardware addresses directly. i am a bit confused between what it can do and what c++ can do with memory addresses.
i know that a pointer in C++ can alter the value of a variable and how it does this. i assume that c also has that ability. but what i dont know is if C++ can directly access a memory location if that memory location is not assigned to a variable. i suppose that C can. in the light of that am i correct to assume that C can do things such as send a group of bites to lets say a printer port or a graphics card but that C++ cannot do that directly? (i.e. the only way c++ can do that is via a library written in C)
i originally thought that C was an outdated language and that C++ can do everything that it can do plus it can do object oriented as well. i just thought that learning C would be a waste of time since C++ includes C functionality as well. but that still does not explain why she would not hire someone who dont know C?
Last edited by quintoncoert; Jul 10th, 2007 at 11:59 am.
>there are deffinate uses for both C and C++ but it is
>not necesarily true that one should learn C prior to C++
Where did that come from? I wasn't talking about which one to learn first, I was talking about your magic comparison of two different languages that somehow makes sense to you but not in reality. Of course you would have to be careful not to mix in C styles when working with C++, just as you would have to be careful not to mix C styles when working with Java. That's what I was talking about.
>what is so special about it that someone cant just learn
>c++ and use it for situations that also calls for C?
C is available on more platforms than C++, so if you work on one of them you have no choice. There's more C code than C++ code out there, and you can expect to be asked to work with some of it. C is considered the base language that every programmer should know. C++, Java, C#, Perl, and the majority of the mainstream languages are based off of C. If you know C, you have insight into why those languages are the way they are. And most importantly, programming culture has grown to expect you to recognize and read C to some extent. It's much like the pseudo code used in technical papers. You're simply expected to know it, and if you don't, you're only hurting yourself.
>am i correct to assume that C can do things such as send a group of
>bites to lets say a printer port or a graphics card but that C++ cannot
>do that directly?
No, C++ can work at the same low level as C.
>i originally thought that C was an outdated language
Just because it's old doesn't mean it's outdated.
>and that C++ can do everything that it can do plus it can do object oriented as well
Keep in mind that object oriented programming doesn't have to be supported directly by language features. Most of the guidelines in OOP can be followed in C with minimal effort. The rest can be simulated.
>i just thought that learning C would be a waste of
>time since C++ includes C functionality as well.
Learning a new language is never a waste of time.
>but that still does not explain why she would not hire someone who dont know C?
That's simple. If someone doesn't know C, that's a good indication that he lacks the experience, drive, and foresight that I look for in exceptional programmers. If someone doesn't know C, the only way he can claim to have worked low level enough to do the jobs I hire for is to know assembly. If he knows assembly but not C, that's a huge red flag because it suggests he's either quite the beginner, or he's too dogmatic about assembly to be of any real use as a professional developer.
>not necesarily true that one should learn C prior to C++
Where did that come from? I wasn't talking about which one to learn first, I was talking about your magic comparison of two different languages that somehow makes sense to you but not in reality. Of course you would have to be careful not to mix in C styles when working with C++, just as you would have to be careful not to mix C styles when working with Java. That's what I was talking about.
>what is so special about it that someone cant just learn
>c++ and use it for situations that also calls for C?
C is available on more platforms than C++, so if you work on one of them you have no choice. There's more C code than C++ code out there, and you can expect to be asked to work with some of it. C is considered the base language that every programmer should know. C++, Java, C#, Perl, and the majority of the mainstream languages are based off of C. If you know C, you have insight into why those languages are the way they are. And most importantly, programming culture has grown to expect you to recognize and read C to some extent. It's much like the pseudo code used in technical papers. You're simply expected to know it, and if you don't, you're only hurting yourself.
>am i correct to assume that C can do things such as send a group of
>bites to lets say a printer port or a graphics card but that C++ cannot
>do that directly?
No, C++ can work at the same low level as C.
>i originally thought that C was an outdated language
Just because it's old doesn't mean it's outdated.
>and that C++ can do everything that it can do plus it can do object oriented as well
Keep in mind that object oriented programming doesn't have to be supported directly by language features. Most of the guidelines in OOP can be followed in C with minimal effort. The rest can be simulated.
>i just thought that learning C would be a waste of
>time since C++ includes C functionality as well.
Learning a new language is never a waste of time.
>but that still does not explain why she would not hire someone who dont know C?
That's simple. If someone doesn't know C, that's a good indication that he lacks the experience, drive, and foresight that I look for in exceptional programmers. If someone doesn't know C, the only way he can claim to have worked low level enough to do the jobs I hire for is to know assembly. If he knows assembly but not C, that's a huge red flag because it suggests he's either quite the beginner, or he's too dogmatic about assembly to be of any real use as a professional developer.
I'm here to prove you wrong.
I expect the reason is that C is still the most widely used general purpose programming language. It doesn't really matter what features are available in C++/Java/etc when an existing system is written in C - many jobs will likely involve maintaining or updating legacy code rather than starting out entirely from scratch - something which you can't do unless you're familiar with the language its written in.
¿umop apisdn upside down? •
•
Join Date: Jul 2007
Posts: 1
Reputation:
Solved Threads: 0
I blv Java and C++ both have a place of their own and it is better to learn both.
Probably coding in Java for application programming is better in the long run. This is specially true because of the fact that Java is converging in terms of performance with C++ with every successive release. Besides you escape from memory leaks and crashes caused by faulty C++ code.
In product development many a times you will find that part of the code is in C++ while part of it is in Java. So if you want to be at the core of things you need to know both.
For me, it is like, I need to know C++ because I need to know the product by knowing legacy code. I need to know Java because I love coding in Java.
AbyBaby
Probably coding in Java for application programming is better in the long run. This is specially true because of the fact that Java is converging in terms of performance with C++ with every successive release. Besides you escape from memory leaks and crashes caused by faulty C++ code.
In product development many a times you will find that part of the code is in C++ while part of it is in Java. So if you want to be at the core of things you need to know both.
For me, it is like, I need to know C++ because I need to know the product by knowing legacy code. I need to know Java because I love coding in Java.
AbyBaby
Try C# sometime. I hear it's halfway between JAVA and C++, so that might be useful. Personally, I'd say C++ is easier to work with; strings are mutable, you just have to type cout instead of System.out.print, and many other little things that make coding easier. Of course, I know very little about coding, so hey...
Beware of the Rancor. I'm not kidding.
If it doesn't compile, try saying "By the power of MegaMan!!!" <this has kinda worked for me, actually...>
Scotland is NOT North Britain, Glasgow does NOT rhyme with "cow", and Robbie Burns is...well, if you don't already know who he was, you're kinda screwed.
If it doesn't compile, try saying "By the power of MegaMan!!!" <this has kinda worked for me, actually...>
Scotland is NOT North Britain, Glasgow does NOT rhyme with "cow", and Robbie Burns is...well, if you don't already know who he was, you're kinda screwed.
•
•
•
•
java compilers and the java runtime environment are created using C++
You can just as well write a JVM in say Fortran or Assembly.
Or create one in hardware.
Anyway, the language a compiler or operating system is written in is no indication that you should know that language first before you can master the language that compiler compiles.
•
•
•
•
learning both C and C++ is good but you may find yourself trying to unteach yourself things from C when you work in C++.
If you're good enough you recognise the different paradigms and don't mix them without very good cause.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
•
•
•
•
Possibly, but not necessarilly.
You can just as well write a JVM in say Fortran or Assembly.
Or create one in hardware.
Anyway, the language a compiler or operating system is written in is no indication that you should know that language first before you can master the language that compiler compiles.
Dont forget to spread the reputation to those that deserve!
![]() |
Similar Threads
- Java 3D Environment (Java)
- Java 3D (Java)
- Java Expert (Needed) (Java)
- Java Chat Reboots (Java)
Other Threads in the C++ Forum
- Previous Thread: exit code error
- Next Thread: josephus problem...
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion count data delete deploy desktop directshow dll download dynamic encryption error file forms fstream function functions game getline givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news node number output parameter pointer problem program programming project proxy python random read recursion recursive return string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






