Visual C++

Visual C++ Examples

How To Add Menu In VC++

adplus-dvertising
Introduction of Visual C++

Visual C++ is one of the most widespread and important languages available today for developing applications for the Windows operating system. Developed and sold by Microsoft, Visual C++ is actually an entire development environment. (FYI, the latest version in stores is 6.0). Visual C++ comes within Microsoft Visual Studio

Visual Studio also contains Visual Basic, Visual C#, and Visual J#. Using Visual Studio, you can mix and match languages within one "solution". We will, however, focus on developing C++ code throughout these labs .Visual Studio is a package that contains all the libraries, examples, and documentation needed to create applications for Windows. Instead of talking about programs. we talk about projects and solutions. Solutions can contain several projects and projects typically contain multiple items or files.Learn Visual C++ In Detail

Visual C++ Tutorials

Visual C++ helps by using wizards to generate an awful lot of code for you. When you install Visual C++, you can create in about 3 minutes a basic windows application which you can then compile and execute. The application will have basic functionality--you can maximize and minimize it, it has a menu bar and a File, Edit and Help menu. It just doesn't do anything. It's up to you to add the code that makes it a database, a word processor, a game, etc.

History of Visual C++

Visual Basic, also know as Visual C or C plus plus, is a software system designed by Microsoft for programming. It was designed to speed the process of programming by making it a graphic application.

16-bit

The first versions of Visual C were based on 16-bit technology. The very first program, known as Lattice C was released in 1983. It was not largely successful, Visual Basic was then released in 1987, and was competitive with other programing software such as Pascal. By 1990, about two-thirds of all business applications were written in the language of Visual Basic.

32-bit

Visual C++ 1.0 was the first 32-bit version of Visual C made available, and was initially bundled with a 16-bit version. Version 4.0 was released in 1995, to be compatible with the new Windows configurations. It was also during this time that Microsoft began embedding C++ properties in other programs.

64-bit

Visual C++ Studio 2008 Express Edition was the first programming software to be made available in 64-bit. This technology is still new, and is considered, by some, difficult to access. Visual C++ 2010 was made available in April 2010; it uses a SQL server database, and IntelliSense.

C++ is one of the components of Visual C++. However, its compiler can process both C source code and C++ source code. Further more, the version 4.0 compiles Fortran code as well. Visual C++ also includes a large and elaborate collection of software development tools, all used through a windowed interface.

The Microsoft Visual C++ includes the tools listed below

Microsoft Foundation Classes (MFC)

A large and extensive C++ class hierarchy library that make the Windows application development easier.

App Wizard

A code generator that creates a working skeleton of a Windows application with features, class names, and source code filenames. It gets a programmer started quickly with a new application.

Class Wizard

A program which generates code for a new class or a new function. It writes the prototypes, function bodies, and code to connect the messages to the application framework.

App Studio

A resource editor which includes wysiwyg menu editor and a powerful dialog box editor.

Difference Between C++ and Visual C++
C++ Visual C++
C++ is a languageMicrosoft Visual C++ is a development environment for the C++ language. It includes a compiler, editor, debugger and much more.
C++ is DOS basedVisual C++ is for Windows based Environment
Advantage of Visual C++
  • Much faster to write programs.
  • Build high-performance solutions faster than ever. Easily create and deploy client applications.
  • Visual Studio is a complete development tools suite that provides corporations with easy-to-use tools for building solutions.
  • How to Write Simple First Program Microsoft Visual C++ 6.0

    Microsoft Visual C++ Integrated Development Environment (IDE). It is a simple step by step walk-through of the process of compiling a console program with VC++ 6.0 on a WinNT machine.

    Step 1- Starting VC++

    Double-click on the Microsoft Visual C++ icon on the desk top, or use the start menu to launch Microsoft Visual Studio 6.0->Microsoft Visual C++ 6.0. It will come up as an empty window with pull down menus across the top, and a tool bar underneath the menu bar.

    Visual C++ Startup Screen

    Step 2- Creating a Project

    All programming in Visual C++ requires using a project to enable the IDE to correctly link all the needed modules. We will set up a project to ensure that the options are what we want. Select File|New from the menu. The "New" dialog box will appear.

    VC++ New Project Dialog Box

    Ensure that the "Projects" tab is selected. From the list at the left, select "Win32 Console Application." In the Location text box on the right, type the name of the directory you wish to create this project's directory in. Alternately, you may select the base directory from a dialog box by selecting the "..." button to the right of the text box. Type in a name for the project in the textbox "Project Name". As you type, notice that the project's name is added to the directory in the directory text box. VC++ will automatically create a new directory with the same name as your project in the base directory.

    Completed New Project Dialog Box

    Select OK to set up the project. Click OK on the next two screens.

    Step 3 - Creating your source file

    VC++ will return to the startup screen, but will add two tabs ("Classview" and "FileView") to the leftmost window. You will need to add any source files needed for your project.

    Select "Project|Add to Project|New" from the menu. This will bring up the "New" dialog box again, only this time the "Files" tab will be selected.

    Add New Files Dialog Box

    Select "C++ Source File" from the list at the left. Enter a name for the file in the "File name" text box. Press OK to create the blank file.

    Step 4 - Enter the program

    Now you can enter the code for a simple First program that uses the standard string class

    
    #include < iostream >
    #include < string >
    
    using namespace std;
    
    int main() {
    
          string s;
          Greeting = "Ashish Kumar Gupta!!";
          cout << Greeting << endl;
          return 0;
    
    

    Step 5 - Compile, link and run

    To compile and link the program, select "Build|Build filename.exe" from the menu. You may then run the program by select "Build|Execute filename.exe".

    Output Screen: Ashish Kumar Gupat