Im so new, I dont even know...

Hello! I'm a new programmer, looking to learn C++. I learned Basic language so as to become accustomed to the fundamentals of programing (like arrays, files, inputing values from/to a file, etc...) and i want to start C++. The only thing is, i know absolutly nothing about it. My dad recently installed MS Visual IDE Express on my computer and i am cluless as how to use it. I know how to create a project and make a .cpp file, i just dont know how to do everything else... There is a drop menu that says "Global Scope", what does that mean and what effects does it have on my code? How do I compile it? I ran the ANSI program in it to see if it could run it, and it says no, but im not quit sure. Can some one please give me the specs?

Also:

is MS Visual a good compiler (if it even is a compiler) and if not, can you give me a good one that's free?

Thank you for your help! I appreciate it.
Last edited on
First off, C++:

http://www.cplusplus.com/doc/tutorial/

Secondly, if you don't know how to use your IDE, play with it. If you mess something up, most likely it's not something that will be saved if you delete your project and open a new one. Also, for the purposes of learning C++, you only need one project with one cpp file in it to make source code ( to start out...you'll use more later ). Start with hello world programs, and move on from there. Basic input and output is the first step in learning what your program is doing and why, and it's one of the most useful diagnostic tools for errors in programs that compile but don't run correctly. Basically just follow the above link, and go down the list on the left one step at a time.
well, its not so much the language thats getting me, mor elike the IDE. I mean, holy sh*t you cant get more complicated for begginers! I cant even find the button to compile it (and im usually extremely good at getting to know programs, having mastered WC3 editor and being a, i guess you could say, techie) and i've looked through every menu and every toolbar. I tried to open the help file and it wont work, i tried going online and finding what's wrong (i found absolutely nothing) I tried seeing if the MS Visual website had any pointers. NOTHING. I couldnt find anything about how to use the program, and im not about to add another SP download, the reconfiguration of my computer, downloading help file crap, etc. HOW MUCH MORE USER-UNFRIENDLY COULD YOU GET? What IDE do you use? what compiler do you use, (preferably free) and can it be used?

Im so freaking desperate, im about to give up altogether. wtf is wrong with microsoft (mabey its just Vis C++? i dont know.) when you need help?
In the code window, press F5.

On another note, I use Code::Blocks under Debian Mint 11, but it's a cross-platform IDE, and not too complex. Although if you're having trouble with VC++, you might have some problems with this, too.
Yhea, first off C++.

Forget about VisualC++.

You first mission is to find tutorials, good tutorials, books, guides, videotutorials, and do what they say to do. They should start with the IDE.

I'm going to tell you something that made me lose a lot of time, and it's extremely accurate in the programming world: "don't try to run if you don't know how to walk, because if you do, you'll definitively fall, and it will take you more time than necessary".

It's not like "you might fail", or "it's possible", No... You WILL fall, in the programming world you need to start step by step, even when doing boring things, because otherwise, you will, and believe me, you will get frustrated.

PS: I also use code::blocks which is mostly used with the MinGW compiler.
Last edited on
its not the Visual part, its just that i cant figure out how the h*ll this program works. There isnt a compile option, it organizes what it calls "projects" in a weird way, and when i want to know what the **ck a part of the program does, there is absolutly no information on it. It's like a person who has been classified by the FBI or somthing. You can know them all you want, but you cant ever find a FACT about them.

Is Code::Blocks include a compiler with it?

I had downloaded Code::Blocks before posting this thread, but didnt know if I should install it before figureing out MS Vis. So, i guess i will have to install it now. Thanks for your help.
Last edited on
If you want to know everything there is to know about VC++, download the MSDN library. It's about 1.8 (minimal files) to about 3.5 (all files) GiB of help documentation.

But I would avoid VC++, mostly because it's proprietary closed source software that intentionally disables certain functions of the IDE and the compiler/linker unless you buy the "enhanced" or "professional" (about $2,000) versions.
ciphermagi,

Want to give me a suggesting of what i should use? This would be more helpful.
Its size is extremely huge! and Isn't cross-platform.
Like we said, Code::Blocks is not only simple, and cross-platform, and open source, it's also very powerful. And it has intuitive buttons, like if you want to run the program, you press the button that's a green arrow (pointing right), and building is a yellow gear. There's even a button for doing both at the same time (it's both icons on the same button).

I would have to say, though that the most powerful pro for Code::Blocks is that it's got a huge following and a great forum for help and advice that you can go to, just like this forum, except it's more based on the IDE than on the language.

Really the only problem with it is that it can't make compiled programs. For this, you will need to gain some command line knowledge about MinGW (or g++).
I wouldn't even worry too much about learning the IDE since you're just beginning C++. All you need to do for now is create one project and write some code. To run a program follow this - Debug -> Start without Debugging
ciphermagi:

I dont need to know G++ to compile, do i?

Maese909:

yes, but to be able to code useing the IDE, i need to... well... use the IDE... and know how to use the IDE.
Thanks guys for the help, i really apprciate it!
@IWishIKnew:

You need it in order to create a .exe file that you can distribute, but to learn C++, you don't have to compile anything, Code::Blocks will build and execute any programs that you write without making that file, so you can test it (in debug mode) any time that you feel like doing it. And gcc and g++ (in linux at least) isn't that complicated, it's like one line of text that you type into the computer for each completed program that you're ready to distribute.
I'm using C::B but I don't know almost anything about MinGW, I mean, if you save your MinGW folder in C:/, C::B automatically get configure when you run it for first time, if you have already opened and you didn't have MinGW installed just put it on C:/ and press the "Auto detect" button, and that's it.

I'm currently linking to static/dynamic libraries all inside C::B, without touching MinGW command lines at all.

C::B automatically call the compiler the linker and everything, and at the end you have a .exe file, ready to be used on any PC.

Maybe if you're on Linux in order to create a .exe is more complicated, but from Windows couldn't be easier.
I'm a fan of Emacs because of exactly what you've described. Emacs is a lot cleaner and friendlier, and the only real "downside" that I see is that you have to write your own Makefiles. You can also customize it to a point where it has just as much functionality as Visual Studio. If you want a good joint book that will both teach you C++ and how to use the Visual Studio IDE, I would recommend getting one of Ivor Hortons Beginning Visual C++ books. They books teach the ins and outs of both C++ and Visual Studio, as well as libraries like the STL, and if you want to keep reading the MFC as well.
Last edited on
Hi, IWishIKnew.

Use Code::Blocks with MinGW instead of Visual Studios. I've tried VS in the beginning too and was in the same position as you.

Code::Blocks is so much simpler and easy to look at. It may be a little confusing at first as well but you'll get accustomed to it.

You can also look for many tutorials on Youtube.com. Just type in "Installing Code::Blocks C++" and there should be many video tutorials for you.

Also, if you have money, you should invest in a good book.

I'm halfway through my book called "C++ in 24 hours". I regret buying it though, because, most of the information in the book is already on the Cplusplus.com tutorial in documentation.

I agree with what the AMSeratoci said. Learn it one step at a time. Being impatient and not practicing what you've learned will force you to relearn it, wasting you even more time than if you've just practice and went on steadily.

The way to learn, in my opinion, is to go on Youtube.com and search for C++ tutorials. You can always press the replay button and you can never "misread" or "misconprehend" what they do, unlike the MSDN documentation since it's very boring and they are not easy on beginners; like myself.
@hellohellomoon:

One of the reasons that I'm on here is to help me learn, actually. I don't have much more that I can learn from the tutorials just by reading it, but by looking over scenarios and other peoples' code, I can see new tricks that I didn't think of, and when I provide an answer for someone, it helps me reinforce what I already have learned, especially if I have to research the answer at all. I never did actually buy a C++ book.
I honestly don't believe that you can get a solid understanding of C++ just through these online tutorials. Subjects like operator overloading could easily have 50 pages devoted to them in a programming book, and the subject gets half a section in the online tutorial. The same goes for topics like Copy Constructors, which there is a lot to say about. I seriously recommend purchasing a book. If you really don't want to pay, you can probably download them online (albeit probably not legally).
It's not all through tutorials. I have understanding of it through college education as well, and through my own application, and like I said, through studying others' code.
Topic archived. No new replies allowed.