What are the most important differences between C++ and Java from a point of view of someone coming from Java to C++?
Too many to enumerate here but:
- Garbage collection
- Function pointers
- Enumerators
- The standard collection libraries (i.e. you're going to need to look up Boost for a hash table unless your compiler supports TR1)
- Write once, compile many times for each operating system.
- Multiple inheritance
- Templates versus Generics and type erasure
Hell, pointers in general. This question should be closed. There's just no way to fully answer it.
C++ is not completely object oriented where as java is. Also C++ compiles to machine language where as java compiles to byte code. you can find more here http://en.wikipedia.org/wiki/Comparison_of_Java_and_C%2B%2B
精彩评论