Quote:
Originally Posted by nesrail
Is it possible to learn Java and then find the equal in C++, like when we learn something in java I can do it in C++???
|
That would be an interesting, and maybe effective, way to approach C++.
A number of basic concepts and constructs are different enough in Java vs. C++ that if you just do things in a the most ordinary way in Java they would not correspond to doing things in the most ordinary way in C++.
The most obvious difference is that Java manages object deletion for you (an object is deleted the next time the garbage collector is run after there is no longer and path to the object).
C++ is a very powerful language, so you could write a few utility base classes and use them to adopt a style of C++ programming that corresponds very closely to ordinary programming in Java. Then you could take anything other than GUI that you write in Java and do that in C++ with very few changes. I think such an exercise would greatly improve your understanding of both.
Java has powerful and unique tools for programming GUI's that don't have matching versions in C++. So if the school is focusing on GUI in Java, you would have a harder time doing closely parallel work in C++.
Alternately, you might simply decide to learn C++ at the same time as Java and write the same projects but not in a closely parallel way.
If you decide to do a close parallel between Java and C++ (for non GUI), the first things you would need are C++ base classes to replace basic objects in Java and references in Java. I would suggest using reference counting in C++ to replace the garbage collector in Java. In some complex projects there may be reference rings so you would need extra work in a reference counting design to avoid memory leaks. But in typical programming reference counting would be a good replacement for garbage collection. C++ smart pointers are a better than C++ references as a semantic replacement for Java references. If all your objects are derived from a common reference counting base class, you could use much simpler smart pointers than are typically used in C++. Then you would use -> in C++ almost everywhere you use . in Java (which would remind you of something Java programmers tend to create bugs by forgetting, that Java references have most of the internal characteristics of pointers). You could instead use C++ references in place of Java references so . would remain . but the functional differences between C++ references and Java references would limit your ability to make the flow of code closely parallel.
If you want to try any of that, ask me for some more details once you have C++ installed and have some simple Java examples you've learned to write.
Quote:
Is there a really good IDE for C?+, that you would recommend???
|
I have only a little experience with IDE's other than Microsoft Visual Studio. From that little experience, I think Kdevelop (
http://www.kdevelop.org/ ) is the best choice. But if you hear from someone with more experience, trust them over me.