i have difficulty in understanding the tutorial. lol is that bad? can anyone give me advice on what should i do... i wan to start learning and i have absolutely no experience in any sort of programming..
please help
Printable View
i have difficulty in understanding the tutorial. lol is that bad? can anyone give me advice on what should i do... i wan to start learning and i have absolutely no experience in any sort of programming..
please help
>lol is that bad?
No, of course not. If you understand everything, you aren't learning anything.
>can anyone give me advice on what should i do
Well, first you should take your time when forming a question and typing it out. If you care enough to present your questions in a coherent manner with well formed writing, you'll find that people care enough to give you equally good answers.
As for learning. Just keep at it and things will start to click. There's no trick for learning how to program. It's all about time and effort. Don't be afraid to ask questions or admit that you don't understand and ask for clarification about something specific. We're here to help, after all. :)
hm. soo.... can u give me online tutorials links that are easy-to-understand and ill check it out... if there are any problems ill post here -x
wow. the files at '' http://www.mingw.org/download.shtml '' is like -.- .. what exactly should i dl for the .exe
Don't download any.
In your baby steps, you probably will prefer a simple IDE. Bloodshed Dev-C++, Code::Blocks, Visual-MinGW, C++ 2005 Express, and others will just take away the hassle of installing a compiler/debugger and speed your learning process.
icic kk =D
do i ned to set the path of the shell variable when im using dev c++?
OK... You need to learn three different things at the same time, and the tutorial only covers one of them! :eek: (That's one really good reason to take a class when you are learning your first programming language.)
1. The C++ language. The tutorials get you started with that. Then, you will need books. A good beginning book will cover about the same material as the tutorials, but with a lot more detail and explanation. For example, Accelerated C++ by Koenig & Moo is about 350 pages. Teach Yourself C++ in 21 Days by Jesse Liberty, is over 700 pages!
2. How to use your compiler/IDE. Most compilers don't come with good easy-to-understand instructions for beginners. I've used several different compilers, and it's not unusual for it to take a half a day to get one installed, configured, and get Hello World compiled!
3. What programming is all about. How programs work, and the kinds of things you can do with a program.... Variables, loops, conditional branching, calculations, etc. ...About compilers, high-level languages, machine language, etc. I don't own any books that cover this subject, but I just found this Introduction To Programming web page. (I haven't read it myself yet... So, I dont know how good it is. :o )
Programing is hard, and C++ is a complicated language. I often compare programming with learning how to play a musical instrument... You can learn a few guitar chords in a couple of days, but you aren't going to impress anybody 'till you've been playing and practicing for about a year.
so.. getting a book is a must? and what book do u reccommend?
See DougDbug's post for two common suggestions for good books to start out with. Many people who get serious about programming will have a series of books to look at/use. So yes, many people will tell you a good book is necessary. Can you write some programs without using a book to help, sure. Can you do what you want without owning a book along the way? Only if you will be writing the most simple of programs. Do yourself a favor: get a good book and add to your collection as your need grows!
i have one dumb question... lol.. u know the sapces between...
eg. #include <iostream> // std::cout
how are those spaces made? using TAB key?
>how are those spaces made?
Um, the spacebar probably. I'm not sure I understand your question.
hm.. like the length of the spaces between #inclue and <iostream> from the guide are quite long and i dont see how i can do that with 1 tap of the spacebar
all you need is one space
ah ic thx =D
did you realy thought you needed more spaces? And did you actually considering counting how many spaces where there?
screenie
There are a few lines in your program that do not need to be there. If you really want to keep them there, use a comment.Also note that main returns an int at the end, a zero to indicate success. If the program crashes main will return some random number for an int instead, so that Windows can tell you a program crashed. At any rate you need to addCode:// 01\01 Hello.cpp
// end of text
Code:return 0;
i counted in between lol .. there were 6 spaces
lol thx citizen .. =D
Whitespace is ignored in C++. You can do
As much as you could doCode:#include <iostream>
Both will compile to the same bits of code. Whitespace is generally used to visually structure code to make it easier to read.Code:#include <iostream>
Note that any text in the code will be compiled. Thus, as the compiler has no idea what you mean by "end of text", an error is generated. If you want to keep it in the source file as documentation, use commenting:
For longer amounts of documentation, use the old-school C comments:Code://prints "Hello World!"
std::cout << "Hello, World!";
Code://start of comment is "/*", end is "*/"
/*
int Krypton()
This will return an unsigned handle identifier to the bloody egg-white mass of Krypton
Intended to be used to combat Superman's meternal mortal enemies and reestablish intergalactic peace in main().
Some more random text here...
*/
what is #include <iostream> and #include <ostream> explained in simple english?
Besides that you don't need to include both of them like that; without going into exaustive detail, iostream provides the classes that you use to print output to the screen, get input from the keyboard, and log and print I/O errors. Check an online reference for more.
btw i have to ask this. what is the recommended age to learn c++... i think im too young -.-
To add to your example. After a year, you can impress musically challenged people but you look musically challenged to real musicians. There's always someone better, or at least, someone to learn from.Quote:
Originally Posted by DougDbug
Hmm... well, most people start in high school, I think. However, just because that is the usual cause doesn't mean that you can't start now. It might be harder though, programming needs discipline and an appetite for learning and solving problems.Quote:
btw i have to ask this. what is the recommended age to learn c++... i think im too young -.-
You are only too young if you think you are. Age usually doesn't matter. Although a 3-year-old probably wouldn't have the attention span to learn programming...
As for SPACE vs TAB, use SPACEs. Liberally.
These staements are the same to the compiler, but to the human the second one is more readable.Code:if(a==b&&c!=5&&d<=7)
if ((a == b) && (c != 5) && (d <= 7))