LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-29-2009, 07:42 AM   #1
nesrail
Member
 
Registered: Jan 2009
Distribution: Differs
Posts: 121

Rep: Reputation: 15
C++ IDE and C++ learning.


Hello.
I am a newbie. I am about to start my studies as a programmer and I know Java is the schools main language and the language you learn there. But I really want to learn C++ instead because it just seem great and I hear great stuff about it.

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++??? (hope you guys understand)

Is there a really good IDE for C?+, that you would recommend???
 
Old 01-29-2009, 08:31 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
The way you write programs is more important. You can learn as many languages as you want.

Java is better than C++ in some ways, but both are bad choices for learning programming (you learn more syntax that way). Lisp or Scheme helps you to concentrate on the actual programming.

Java to C++ is easy (mostly), but it is not a good idea to translate directly. Look for more detailed articles on the web

IDE --> Kdevelop
 
Old 01-29-2009, 08:37 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
If you are taking a class in school, just do it their way. You can worry about the transition later.

With programming languages, learn them one at a time. As already stated, the important thing is to learn programming, not languages.
 
Old 01-29-2009, 08:51 AM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by nesrail View Post
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.
 
Old 01-29-2009, 09:45 AM   #5
cirdec
LQ Newbie
 
Registered: Jan 2009
Posts: 1

Rep: Reputation: 0
As for a good cross-platform C++ IDE, I prefer Code::Blocks. I use it in combination with wxWidgets when I need a GUI.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
If making a raid0 partition from large IDE and SCSI, will rest of IDE risk more wear? streams &dragonflies Linux - Newbie 3 10-18-2008 07:30 PM
RH9 &9.0 Benq CDRW 4012a IDE + IDE CDROM - Install - how to cgtueno Linux - Hardware 6 05-30-2004 02:43 PM
hpt372 ide controller and on-the-fly ide removeing captgoodnight Linux - Hardware 0 01-25-2004 12:38 AM
bad dmesg output when using ide-scsi boot parameter for IDE CD/DVD-ROM Locura Slackware 7 09-29-2003 02:36 AM
how2 make the kernel scan both PCI IDE and Mboard IDE channels? carboncopy Slackware 1 07-23-2003 03:26 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration