PDA

View Full Version : Getting Into C++



OrphanShadow
August 6th, 2007, 04:13 PM
Ok, Ive just started out on linux, and im after some tips on starting out with C++.

Ive already tried anjuta (i think thats it), but i found myself completely out of my depth.

Any tips on where to start, like what software i should get. Eclipse, maybe?

Thanks in advance.

Skardal
August 6th, 2007, 04:27 PM
Take a look here:
http://ubuntuforums.org/showpost.php?p=1983565&postcount=2

If you are new to programming, maybe you should just stick with a text-editor and gcc for compiling. That way you don't need to focus on learning an IDE as well :) After you've learned the basics then you can take a look at the IDE's and find your favorite :)

Good luck!

Wybiral
August 6th, 2007, 04:29 PM
I do all of my C and C++ programming in GEdit.

It's not an IDE, it's just an editor with tabbed windows and syntax highlighting.

It also has a terminal plugin that gives you a command line at the bottom so you can compile in the same window.

It's very simple and learning the commandline compile commands is never a bad thing. Then you can move on to makefiles for more complex builds.

If you ever find you NEED a fancy IDE, go for it. But unless your project is huge and distributed amongst a large team of people, a simple text editor will do.

LaRoza
August 6th, 2007, 04:42 PM
GEdit and the terminal is the second easiest way to do things. Using Vim is easier, but Vim takes time to learn, but once you do, you don't look back...

pmasiar
August 6th, 2007, 04:47 PM
C++ is hard language for a beginner - especially self-learner. Look at the Python first (see my sig for links).

After you master programming basics (variables, loops, functions, debugging), you can try to do same things in harder language, like C++

LaRoza
August 6th, 2007, 04:52 PM
If you are learning C++ as a first language, like me, you will find somethings confusing, but that is no reason not to learn it. My sig has a link to my wiki, and has great tutorials for C++.

As another mentioned, Python is an easier language to learn. This is important, because the quicker you learn the basics, the easier it will be to be productive. Python has a clean, easy syntax, so it is easier to learn such basics.

Python also doesn't need to be compiled, so it will be easier to run.

Wybiral
August 6th, 2007, 04:57 PM
C++ is hard language for a beginner - especially self-learner. Look at the Python first (see my sig for links).

After you master programming basics (variables, loops, functions, debugging), you can try to do same things in harder language, like C++

Pmasiar's always trying to get people to look at his python...

(yes, that was supposed to be a joke)

(btw, how's it going pmasiar?)

Anyway. Python might be easier... But maybe he/she wants to learn C++ for some reason. C++ isn't THAT bad, I taught myself C++ just from the internet and a few books. Then again, it wasn't my first language...

LaRoza
August 6th, 2007, 05:01 PM
Anyway. Python might be easier... But maybe he/she wants to learn C++ for some reason. C++ isn't THAT bad, I taught myself C++ just from the internet and a few books. Then again, it wasn't my first language...

This page has a link to a very good tutorial:

http://laroza.pbwiki.com/LearnCpp

You won't need to buy anything. Also, the wiki has other links to many resources in the library (http://laroza.pbwiki.com/ProgrammingLibrary).

It was my first language, and it mostly wasn't confusing, but it takes longer to understand than Python, or Perl.

pmasiar
August 6th, 2007, 05:35 PM
Pmasiar's always trying to get people to look at his python...

(yes, that was supposed to be a joke)

lame, but oh well... :-)

I believe that if you have 6 months to learn C++, you are better off to spend 3 months to learn basics in Python, and and 4 months trying to do same in C++ - you will have better understanding what is going on.

> (btw, how's it going pmasiar?)

summer - relaxing, taking it easy... - how are you? did you found some learning opportunities you were looking for?

> Anyway. Python might be easier... But maybe he/she wants to learn C++ for some reason. C++ isn't THAT bad, I taught myself C++ just from the internet and a few books. Then again, it wasn't my first language...

Even if she wants to learn C++, if IMHO better to start with Python. It is just less confusing, especially for a beginner with no idea what type conversion is.

Wybiral
August 6th, 2007, 05:57 PM
lame, but oh well... :-)

I believe that if you have 6 months to learn C++, you are better off to spend 3 months to learn basics in Python, and and 4 months trying to do same in C++ - you will have better understanding what is going on.

> (btw, how's it going pmasiar?)

summer - relaxing, taking it easy... - how are you? did you found some learning opportunities you were looking for?

> Anyway. Python might be easier... But maybe he/she wants to learn C++ for some reason. C++ isn't THAT bad, I taught myself C++ just from the internet and a few books. Then again, it wasn't my first language...

Even if she wants to learn C++, if IMHO better to start with Python. It is just less confusing, especially for a beginner with no idea what type conversion is.

It's debatable... I see your point in respect to the "learn if fast, then refine your knowledge".

But, my philosophy is to start low level, then add the layers of abstraction as you go. I think a programmer should learn basics of hardware and logic first, then learn up to languages like python.

Are either of us wrong? No. It's up to the programmer which route he/she chooses to take.

I will agree with you that C++ of all languages might not be the best to learn, but we don't know if the OP has programmed in anything else. Maybe they are a seasoned Python programmer... Maybe they are a master of assembly and C. But they asked about a development environment.

PS: I am definitely taking a few O'Reilly courses this fall. After that I just want to better job so I can actually pay for some decent education (O'Reilly is good... But most places seem to want an actual degree, especially in computer science).

pmasiar
August 6th, 2007, 06:28 PM
But, my philosophy is to start low level, then add the layers of abstraction as you go. I think a programmer should learn basics of hardware and logic first, then learn up to languages like python.

Yes, I also learned programming from assembler up. but back then CPU was much simpler: IBM/360 and PDP/11 has *much* simpler CPU design, easier to learn. When faced with learning i80 CPU architecture, I balked at the ugliness (especially compared with beauty of PDP/11) and decided to go to database applications instead :-) where C is too low-level language to bother with :-)

> PS: I am definitely taking a few O'Reilly courses this fall. After that I just want to better job so I can actually pay for some decent education (O'Reilly is good... But most places seem to want an actual degree, especially in computer science).

When dealing with recruiters and facing red flag like that, is better to disclose it directly in cover letter. You can always say something like:

"my financial situation did not allowed me to attend college full time to get degree. I got O'Reilly certifications because it was IMHO best value for money and time, and I am prepared to continue my education part time (on my own time) in any facility your company think is most appropriate."

If they don't appreciate they got a self-learner with the drive, it is most likely ossificated bureaucracy where you don't want to work anyway. Or they will ignore it, and include you into the pile even without education. Then you need to add same disclosure in your resume (in education section) - cover letter can be separated from resume.

Good company will even pay part of your tuition.

American College of Computer & Information Sciences (ACCIS) - http://www.study-online.net/colleges-universities/823.html was respectable one (20 years in distance learning) but website is down? It hard to tell - and you need to be careful to not get scammed.

OrphanShadow
August 6th, 2007, 09:44 PM
Hey, just like to thank everyone for helpin me out. Im new to linux as it is, so things have been a bit nerve-racking to say the least (i'd been using windows 5 years prior to switching, so it was a bit scary at first.)

Ive already grabbed g++ compiler, but i guess i didnt think GEdit was a viable option. But ive got eclipse on standbye if i ever need it.

As for python, ill be sure to check it out.

cheers for help again.

cprofitt
August 7th, 2007, 01:54 AM
If you decide to learn Python first and then jump to C++ I would suggest getting the following book: link (http://search.barnesandnoble.com/booksearch/isbninquiry.asp?ISBN=1887902996&pdf=y&z=y)

I taught myself VB.Net and C# prior to taking a little run with Python and I can tell you that the details in the book revealed a new level of general understanding.

C# books talked about using recursive functions, but failed to go in to the depth this book did with when to use a simple loop and when to use a recursive function. Very eye opening. There were several other topics that I found informative.

My current plan is to learn and become comfortable with Python and then learn either C or C++ for problems that speed becomes essential for. Your choice of language may also be dictated by the types of problems you want to solve.

I found C# very, very good for database applications on Windows; but it lacks support for very large numbers that would be needed to build a 196-Algorythm program.