Sign in to follow this  
Count_Zero99uk

C++ IDE

Recommended Posts

Im using the Visual C++ Express Edition IDE to learn programming, and im confused. After some battering about and use of the forums and some helpful people i got my first program compiled and then ran the program from a command line. See i called the project week1 and then the file i created in it Hello.cpp expecting to compile hello.cpp into hello.exe in compiled week1.exe. My question is this, im not used to terms such as "project" "build" "adding file to project" it all seems a little odd. The experience of programming i have had involved modula 2 and some kind of basic. Wherein i wrote a program and compiled it. And it either threw up an error or created an exe which i then ran. Job sorted. I assume that this project lark is all to do with OOP which i have never covered. If someone can give me a brief primer on what i need to know. Thanks again for your help and advice Zero.

Share this post


Link to post
Share on other sites
Project groups together all of the different source files you're using for your program. Build is referring to compiling all of those files and linking them together. The output from building a project is a binary of some sort (either a .dll, .exe, whatever).

In the Project settings is where you find other options like whether or not this is going to be a console project, what compiler optimizations you want to include etc.

The Project really represents the thing you're trying to build and groups together all of the settings and other files you need to make it happen.

You may also come across "Solution" in Visual Studio. A solution is simply a group of Projects.

Good choice for an IDE. Though everyone has their personal favorites for whatever reason, and though it really is a religious war when it comes to discussing which is the best, I think Visual Studio is the best.

I hope this answer has helped you in some way.

Share this post


Link to post
Share on other sites
So basicaly the project is what will become the exe (or whatever not got into making dlls yet)

So at the moment with these simple 20 line programs the projext will just contain the .cpp file.

Share this post


Link to post
Share on other sites
A project isn't really anything. More or less it is a way for the IDE to remember what you are doing, and what settings you've changed. If you go through the project settings menu, you can see the exact commands which will be run through the command line when you build your application. The layers of abstraction you're seeing are simply the IDE separating you a little from the lowest levels of creation, and in essence making it a bit easier to focus on the more important things: your code.

So a project is just Visual Studio's method of keeping tabs on your work, and typically projects will compile into one finished product when they are built. If you wrote a small section of code in some other program, saved it, and wanted to use it in your project in Visual Studio you would add those files to your project and then you could reference them from within the IDE. This also tells the IDE where they are so you can include them and compile them in to your application.

It isn't much to do with OOP rather than keeping your project a cohesive unit and allowing centralized control of all of your settings. Well, in a way I guess it is OOP in that it makes your project an object :)

Share this post


Link to post
Share on other sites
OK thanks for the information and advice.

Its taking me a long time to work through this stuff, i thought id have more time, but work and other commitments are harrasing me, oh well.

Once more into the breach we go.

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