Hi Rik.
Thanks for the feedback. Without it I have no way of knowing who’s doing good and who thinks they’re hopelessly in trouble and stuck for life.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote
Everything seems OK so far. I thought that the lectures were very clearly written and easy to follow. I now feel comfortable with using the IDE to create new workspaces, adding projects, compiling, building etc which I think has been the main focus so far.
It takes awhile to get used to the IDE and it is intimidating for awhile. In a few more months you’ll be an ole pro at it
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote
I do have one question though. Could you explain when you would use 'an empty project' and 'a simple application'?
It was imperative to start youse guys off with an empty project so that you’d be able to build things, especially the main function and to be able to make new files from scratch as you were getting used to the compiler.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR> When you create the latter you get an additional source file StdAfx.cpp and the header file StdAfx.h. The associated ReadMe file talks about a precompiled header. Is this some way to optimize build time for large projects?
If I am prempting the subject of a later lecture please feel free to defer answering until then. <HR></BLOCKQUOTE>This is the exact time to bring up the question because stdafx.h gets in the way. When you create your own projects for play in “sandbox,” use the simple application option. The wizard automatically creates the stdafx files and puts the #include "stdafx.h" line in your main file.
Additionally, it attaches stdafx.h and stdafx.cpp to your project. Additionally it adds “int argc” and “char* argv[]” as parameters to main. In the beginning they all get in the way.
Do the following:
1) Rewrite main to be in “main()” with no parameters. argc and argv are parameters passed into your program from the command line, and we’re haven't reached there in the course yet.
2) In terms of the stdafx guys, we’ve got to get rid of them and do some disabling in the compiler. They are used for precompiled headers which we definitely DO NOT want.
First, delete them both from the project you create, Do this by highlighting them in the workspace box on the left and hit the delete key. This removes them, two files, one in the source folder and one in the header folder, from the project.
Then, bring up a windows explorer, get into the source directory of your project and delete both files.
Close the ide and bring it up again to verify everything has been cleared out. Not necessary, but sometimes a good sanity check.
Next can be tricky, so be careful. Left-click on the project; not the workspace, folders, or files, but on the project to highlight it. Then right-click. Just below the center of the menu that appears, is a line that says “settings” and is separated into a group all by itself. Left-click on settings. The “Project Settings” dialogue box pops up. Click on the C/C++ tab near the top of the box. It’s the only thing that has C/C++ on it, so you can’t miss it (I hope). “Category:” is has a pull-down box next to it. Open it up with the arrow button. Highlight the line one-up from the bottom. That’s “Precompiled headers.” Left-click on it.
When you do that, more instructions appear in the dialogue box.
Press the “not using precompiled headers radio button”. Press ok and the dialogue box goes away. If you have followed all the above steps your project will now compile using F7. I didn’t want to show this method first because I know I’d be on the borderline of tilt if I was trying to learn everything together from scratch.
The hello world option does the same as a simple project except that it adds printf, hello world, exactly what you were to do on your own in the beginning. Remove all the stdafx stuff with this one and you need to add #include stdio.h (pronounced “studio-dot-aych” to get it to compile.
------------------
Allen Moulton from
Uechi-ryu Etcetera