If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Why compile in visual c++?

Hi there,

I have started to write c and c++ programs using the visual c++ IDE, although I have no idea why visual c++ offers users the ability to build and/or compile a piece of code, when building the code in-order to debug the code creates an executable in the Debug folder.

I am fairly sure that there must be a reason for offering users the ability to compile and/or build a piece of code, and not just offering the build operation. Therefore if anyone could inform me as to the use of having both operations available in this IDE I would be grateful.

If I understand your question correctly you are asking why the software creates chunks of compiled code in addition to the full exe's it can create?

This allows you to create reusable code. An example would be a class def. for a security layer object. When the object is created it's constructor accepts information about the systems database location and login info. Then your system calls functions in the security object for login, authencation, ect..

You can also build projects with different sections written in different languages.

No, I don't mean that visual c++ creates reusable code, such as header files or functions.

When you use visual c++, to debug code you have to "build" the code first and this creates and executable in the Debug folder. In addition to the build option the user of this IDE also has the option the compile the code to create and executable.

Therefore my question is, when using visual c++, what does the compile operation do that the build operation does not?