Sign in to follow this  
Shaihalud222

IDE Tutorials?

Recommended Posts

Shaihalud222    138
First off, hello everyone! This is my first of hopefully many posts here. Long story short, I'm teaching myself C++ from a textbook (Deitel's), for which Visual C++ Express was included. Working with the IDE? is proving to be quite a burden, tainting what otherwise is something I'm really enjoying. Even when I've managed to get it to run my programs, I'm constantly staring at features that are a complete mystery to me, and oh how it tortures me! :( That's the best case scenario though; after taking a short break from my studies I returned to have either forgotten what little I knew, or it is in fact evolving to spite me. ;) So... what would you suggest? I am of course actively working to find resources to help me, but after hitting a few dead ends I remembered that a friend had recommended this site to me. Thanks in advance. And any random tips for an aspiring self-taught game programmer are much appreciated. :) Edit: When I first started the thread I mistakenly referred to an IDE as an API, sorry for the confusion. [Edited by - Shaihalud222 on August 19, 2008 12:35:44 PM]

Share this post


Link to post
Share on other sites
CableGuy    1335
First, welcome to GD.Net.

As for your question you really need to supply us more information, like which API you're searching a tutorial for?

I'm guessing that you refer to the win32 API. If that is the case I suggest you to check out SDL which is a library that hides various common functions(window creation,blitting,sound...) under a simple cross-platform API.

Hope this helps.

Share this post


Link to post
Share on other sites
stonemetal    288
Quote:
C++ from a textbook (Deitel's)

He is using a c++ textbook I am pretty sure he is talking about the std lib.

Anyway, it just takes time. At first work with msdn open and look stuff up whenever you need to. Then try to work without a reference, the harder it is to look something up the more likely you are to remember it. Try to not lean on auto complete to much.

Share this post


Link to post
Share on other sites
Gage64    1235
If you are indeed talking about the STL, I highly recommend Thinking in C++, Vol. 2 (also available for download in my sig). It has 4 large chapters on the topic and I found it easier to work with them than with other books and tutorials.

Share this post


Link to post
Share on other sites
Shaihalud222    138
Thank you very much for the fast replies. I'm afraid I'm really not certain what information to give or I would have. I shall follow up on your suggestions and go from there.

Share this post


Link to post
Share on other sites
Gage64    1235
Quote:
Original post by Shaihalud222
Thank you very much for the fast replies. I'm afraid I'm really not certain what information to give or I would have. I shall follow up on your suggestions and go from there.


Some of these suggestions are only good in certain situations (for example, learning something like SDL if you just started programming is pointless).

What do you mean when you say "API"? Can you give an example of what you are having trouble with?

Share this post


Link to post
Share on other sites
Shaihalud222    138
I think I may have misused "API". After reading a few threads I wonder if "IDE" was the correct acronym.

It is Visual C++ Express, the application, that I'm struggling with.

Share this post


Link to post
Share on other sites
Yann L    1802
Quote:
Original post by Shaihalud222
It is Visual C++ Express, the application, that I'm struggling with.

Visual Studio is a complex beast, and can be overwhelming to comprehend when you just start out. But don't worry, it'll come with time. The best approach is to simply ignore all the features you don't understand at this time. This can easily be 90+% of the IDE, but this shouldn't really concern you. Most of these features are used in combination with programming and development techniques that you don't use yet - so you won't use these features either.

To start with the VS IDE, you essentially need to know only a few basic things. First of all, you need to know how to use the text editor and the solution explorer. These should be easy, and are probably described in your book (since it included the IDE). Then you need to build and run your project. You should already know how to use these functions as well, they're really basic stuff.

And that's basically it. All the myriad of other features aren't really useful to you at this point. As you will progress with C++, you will gradually learn how to use the more advanced parts of the IDE.

Share this post


Link to post
Share on other sites
DvDmanDT    1941
There are books about Visual C++. I have one, and it taught me some of the features.

The main reason to use Visual Studio is the integrated debugger. You press F5 to start debugging and Shift-F5 to stop debugging. If your program crashes while debugging, you'll see a dialog in Visual Studio asking if you wish to break or continue. Continue will probably just end the program. Break will take you to the line where the program crashed and let you examine all the variables (just hold your mouse over them).

If your program just stops responding, it's probably stuck in an endless loop, use "Debug->Break All" to halt the program and find what line is currently executing (also lets you examine all the values). Then press F5 to continue or Shift-F5 to kill the program.

If you have a part of a program that doesn't behave as it should, you can set a "breakpoint" using F9 (a red circle will appear to the left). The program will halt once it reaches a breakpoint and let you examine all the variables and so on.

When you have hit a breakpoint or used "Break All", you can move to the next line using F10 and/or F11. F10 will just move to the next line, F11 will move into the function on the current line. Just try it.

When debugging, the interface of Visual Studio changes somewhat, and some new windows appear. There's the Autos/Locals/Watches window, which displays lists of variables and their values (same as moving your cursor over a variable). You should also have a "Breakpoints" tab, a "Call stack" tab and possibly some others. The breakpoints tab lists all your current breakpoints. The callstack tab lets you see how you got to the current line/function. This is really important sometimes (quite often).

Ctrl-Alt-I will give you the Immediate window. It's a bit complicated to use, but while in debugging mode (your program must be halted), you can use it to call any function with any argument (you can use variables). You probably won't need this at first, but it's quite nice to have. For example, you can type "sin(1.0f)" and it'll respond with something like "0.84".

If you debug and find a variable with a value like 0xCCCCCCCC or 0xCDCDCDCD or similar, it's most likely a special value meaning something like "uninitialized" or something like that.


There are hundreds if not thousands of other features, but knowing the debugger is imo by far most important and useful.

Share this post


Link to post
Share on other sites
Shaihalud222    138
Wow. Thanks again for the truly enlightening replies. The truth is, the book I'm using includes no instructions for the IDE, which is the only reason why I'm so lost. I'll be immediately putting to use this advice and probably asking for more if you don't mind - hopefully I can return the favor some day very soon. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this