Programming in VC++ using MS Visual Studio 6.0

Progrraming in VC++ Tutorial

This document will give a brief introduction to C++ programming using Microsoft’s Visual Studio 6.0 environment. The main thrust of the tutorial will be to understand the basic workings of the C++ language for mathematical calculations and its integration with the statistical program S-PLUS.

Visual Studio 6.0 is Microsoft’s programming environment for the different languages they support. As in most Microsoft software, it is especially geared for Windows, but in this document we will only touch the standard C++ language, so it should be possible to compile (more on that later) the programs in other compilers, like Borland’s C++ Builder and Gnu’s gcc. Only the code we will use for the S-PLUS part will be Windows specific.

 Compilers

 When you use a programming language to write some code you use a grammar that, though not always easy, is readable. This code will allow you to define variables using base 10 numbers, write alphanumerical characters to files and the screen, etc. This source code is completely obscure to the computer, since the machine uses binary for everything, from numbers to characters, and, unless told, does not know what a screen or a file is. You need a program that will translate the source code into binary code, which is what the computer will run. This program will perform the translation in several steps, and though only one of them can be properly termed as compiling, the whole program is normally called a compiler.
C compiling will start with your source code in one or more files, and run the pre-processor directives it finds at the beginning of the code (lines that start with “#”). It then will compile the resulting code into object files, which contain machine code and other information about variables and objects in the program. The resulting object files are taken as input by the linker, which will link them and add several the libraries the program needs to run properly. The end result will be a binary-code file the computer can use.

The binary files are dependant on the type of computer, processor and operating system you use; so do not try using a program compiled on a Windows 2000 Intel Pentium machine with an UNIX Sparc system, it will not work. You will have to recompile the source code into binary-code files for the appropriate system you are using.


Download complete document from the attachments section below.


Attachments

Comments (2)

Said this on 12-31-2007 At 05:56 pm
its really worthy
shilpa
Said this on 1-12-2008 At 11:17 am
it is really useful for new users.
Post a Comment
* Your Name:
* Your Email:
(not publicly displayed)
Reply Notification:
Approval Notification:
Website:
* Security Image:
Security Image Generate new
Copy the numbers and letters from the security image:
* Message:

Email to Friend

Fill in the form below to send this article to a friend:

Email to Friend
* Your Name:
* Your Email:
* Friend's Name:
* Friend's Email:
* Security Image:
Security Image Generate new
Copy the numbers and letters from the security image
* Message: