Decided on C++ , Now what? Please help :)

For everyone, just starting with C++ or programming at all. Ask newbie questions in this forum!

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard

Decided on C++ , Now what? Please help :)

Postby Lithic » Mon Apr 23, 2012 6:52 pm

Ok so i have always wanted to learn to program ever since i saw my cousin using VB and using BAS to create PUNTERS and MASSemailers back in the AOL day's lol.

I finally realized that with my knowledge i would like to apply it towards the gaming field but not 100% and def wouldnt be the only thing i use it for. So i figured that c++ being the industry standard im told would be a good language, and im told that c++ is a great starting language since it can be both Object oritented ( whateve that means ) and something else?


Here is my problem , I have NEVER coded a thing in my life , i have no idea where to even start whether that would be opening a text file and typing things etc etc.
So i really just need some good guidance as to , now that i decided i want to, i need the HOW to
Instead of (READ BOOK A ) If someone could take just a min out of your time to explain (if and what programs i should need/use ) (a simple online course to follow ) (tutorialzied learnining if better) (etcetc?)

Thanks in advance guys i appreciate any and all help.
Lithic
 
Posts: 2
Joined: Mon Apr 23, 2012 6:40 pm

Re: Decided on C++ , Now what? Please help :)

Postby exomo » Tue Apr 24, 2012 1:23 am

Hello, welcome to the forum.

About what language is the best to start there are many different opinions. But I don't think C++ is the worst choice.

Most people I know say that you learn best with a book, but I never read a book about C++ and learned the language anyway. Sooner or later you will come to a point where your book does not provide the information you're looking for and then you have to look it up somewhere else. There are lot's of online tutorials, but many of them are outdated (using an old C++ standard) or just bad and for a beginner it is hard to know the difference. (One indicator is the used iostream header. Whenever you see a line like "#include <iostream.h>" the tutorial is outdated, don't use it.)
One tutorial I know is http://www.cplusplus.com/doc/tutorial/. But this is only about the C++ language, you won't learn how to compile you files and other stuff you should know. But as soon as you know how to compile your code this is a good point to start.
What you need: The only thing you definitely is a compiler and a text editor. What compiler you can use depends on you operating system. Linux has gcc/g++ installed by default. On Windows you can use the mingw package: http://sourceforge.net/projects/mingw/files/. You can use any text editor you like, that can save file as plain text. Windows notepad can do the job, but you usually want to use a smarter editor. That's where it comes to the IDE. IDEs make the life so much easier. I use Code::Blocks, but there are many others. On Codeblocks you can just select "New project", chose "Console application" and there you are, your first C++ program. Just hit the compile and run button to start the program. You can then start entering the source code from a tutorial, without really knowing how the compiler works.
One more thing you need is the ability to figure things out on your own. Almost everything you should know can be found on the internet.
Who needs a signature anyway.
User avatar
exomo
 
Posts: 881
Joined: Fri Sep 26, 2003 12:30 pm
Location: germany->baden

Re: Decided on C++ , Now what? Please help :)

Postby Lithic » Tue Apr 24, 2012 8:19 pm

Thank you very much for your help but could you plz answer a few more questions.

In what step do i need to know these things.

Should i first learn what is and how to compile
Than should i learn how to code?
The problem i have is WHERE to start like i cant just open a text document and start typing things because..well.. i dont know what to type heh.

Thanks in advance to anyone who can help.
(( I start my Intro to computer programming soon at university and i really want to get a hand on things before the class starts even though its an intro i want to know above anad beyond what i need going into the course ))
Lithic
 
Posts: 2
Joined: Mon Apr 23, 2012 6:40 pm

Re: Decided on C++ , Now what? Please help :)

Postby exomo » Wed Apr 25, 2012 2:56 am

Do you know what programming language they will use at university? If it's not C++ it is perhaps more useful if you start with the language they will use. At my university they usually teach Java, and although Java and C++ have a similar syntax I would not advise learning one language if you are going to use another one, they are quite different and for a biginner it can be confusing.

About your question:
You should at least know how to compile a simple single-source-file program. It is important to know how to link multiple files to one program, but I think it is more important to know the language basics. As long as you don't know how functions and classes work you won't know why you should use multiple files. That's why I would suggest you start on coding (in a single file). If you use an IDE you don't have to care much about the compiler commands. At some time you should learn how to write a program in multiple files, you can do this later.
I just found another tutorial that at a first glance looks up to date and covers both compiler and installing the ide and the c++ language. http://www.learncpp.com/
section 0.7 of the tutorial has one mistake: "Some compilers (eg. Bloodshed’s Dev C++) don’t automatically pause the console screen after the program has finished executing." That is nonsense. Dev C++ is an IDE like Codeblocks or Visual Studio, not a compiler. The compiler (which ich g++) never pauses a program. Codeblocks has a setting that can keep the console open after you program exits (there's an option in the project settings, it is enabled by default) and visual studio can do it with a special shortcut (something like ctrl+f5 for debug mode, but i'm not sure about the keys)
Who needs a signature anyway.
User avatar
exomo
 
Posts: 881
Joined: Fri Sep 26, 2003 12:30 pm
Location: germany->baden

Re: Decided on C++ , Now what? Please help :)

Postby joshcschool » Wed May 09, 2012 6:20 pm

Hello and welcome to the forums! There a few things you need to know in order to learn C++


1. Use documentation
many pdfs of books can be found all over the internet and you can use all of this information to help learn or to help explain something better

2. Make mistakes
you should and will make make mistakes on your programs , this is one of the best ways to learn!

3.Ask questions here or on another C++ forum
just don't come across like you want the forum to do the work for you , only use it as a guide so you can truly advance your skills.
joshcschool
 
Posts: 3
Joined: Wed May 09, 2012 6:12 pm


Return to For Beginners

Who is online

Users browsing this forum: No registered users and 1 guest