Microsoft Visual C++ 6.0 Ide Tutorial Creating Win32 Console Mode

Microsoft Visual C++ 6.0 Ide Tutorial Creating Win32 Console Mode

Document 2002-31 MICROSOFT VISUAL C++ 6.0 IDE TUTORIAL Creating Win32 Console-Mode Applications Jeffrey S. Franzone, Assistant Professor Engineering Technology Department University of Memphis Abstract Microsoft Visual C++ is a commonly used programming language and application environment in many computer science and computer engineering technology programs. Visual C++ can be used to teach both C and C++ and it boasts a highly powerful, but easy to use, development environment. One of the strengths of the Visual C++ product is the different types of applications that can be generated. Visual C++ supports Windows applications, DLLs, and console-mode applications, to name just a few. Visual C++ 6.0 is currently used in the C/C++ programming curriculum in the Computer Engineering Technology Department at the University of Memphis. The department has chosen this product to teach C and C++ programming for three major reasons: 1) it is a professional and modern C/C++ programming application platform that is an industry standard, 2) it is relatively easy to use and its rich set of features and tools can be taught in parallel with C/C++ programming concepts and techniques, and 3) it supports console-mode programming. Visual C++’s console-mode support makes it an ideal application platform for teaching C/C++ programming fundamentals in lower division programming courses. It is believed by many (and supported by many C/C++ programming textbooks) that console-mode programming is an easier environment to teach, analyze, and learn fundamental C/C++ programming concepts and standard programming techniques. Many of these concepts and techniques, when taught in a console-mode environment, are also more portable to other computer platforms. The purpose of the Microsoft Visual C++ 6.0 IDE Tutorial is to support computer programming instructors who want to use the Visual C++ product to develop Win32 console-mode applications in introductory C/C++ programming courses without spending several weeks explaining the Visual C++ environment. The tutorial takes a visual, step-by-step approach in demonstrating how to create a Win32, console-mode application as well as covering introductory programming concepts such as the “edit, compile, link, and run” process and useful procedures such as printing source-code and program output. The tutorial is thorough and complete enough to be given as a lab or homework exercise or as a class exercise done in a laboratory setting. 7.861.1 Page Proceedings of the 2002 American Society for Engineering Education Annual Conference & Exposition Copyright Ó 2002, American Society for Engineering Education I. Introduction The Microsoft Visual C++ IDE Tutorial is organized under the following sections with a brief description of the concepts covered under each section. The complete tutorial is provided at the end of this paper. 1. OBJECTIVES A very brief general summary of the purpose of the tutorial. 2. RESOURCES YOU WILL NEED An outline of reader skills, materials, and software needed to successfully complete the tutorial. 3. INTRODUCTION TO C/C++ DEVELOPMENT This section briefly discusses the edit, compile, link, and run development process for C/C++ programs, the types of files generated by each step, and the meaning of “console-mode”. 4. CREATING A PROJECT & WORKSPACE This section uses visual screenshots to single-step the reader through the process of starting Visual C++ 6.0 and creating an empty Win32, console-mode application, an overview of the more important IDE commands and windows encountered in the development environment, the meaning of the terms “Project” and “Workspace”, and some of the important files generated by the creation of an empty Win32, console-mode application. 5. CREATING A SOURCE FILE This section uses visual screenshots to show the reader the steps necessary to create a blank C/C++ source file and include it in the current project. 6. USING THE IDE EDITOR This section instructs the reader to enter an example C program into the Document Window. Issues concerning saving files, opening and saving project files from a floppy-disk versus a hard disk, and generating a default workspace are also discussed. 7. COMPILING A PROGRAM This section instructs the reader on the steps needed to compile a C/C++ source file and the purpose of the Output Window. To demonstrate how the compiler detects syntax errors, an error is purposely entered into the example program to generate a compilation error. 8. LINKING A PROGRAM This section instructs the reader on the steps needed to link a C/C++ object file. Page 7.861.2 Page Proceedings of the 2002 American Society for Engineering Education Annual Conference & Exposition Copyright Ó 2002, American Society for Engineering Education 9. RUNNING A PROGRAM This section instructs the reader on the steps needed to run a C/C++ executable file from within the Visual C++ development environment. Visual screenshots are used to demonstrate the running of the example program. Also, instructions are given on the steps needed to run applications from a windowed-screen to a full-screen and vice- versa. 10. PRINTING SOURCE CODE & PROGRAM OUTPUT This section discusses the steps needed to print source code from within the Visual C++ development environment and how to use text or graphics screenshots to capture and print program output. 11. OTHER ITEMS OF INTEREST This section consists of several subsections that describe useful shortcuts in the development process and common questions that arise when developing Win32, console-mode applications for the first time. The subsections include: a). Reopening a Project. b). Where do I find my program’s executable file? c). Do I need Visual C++ to run my applications? d). Using the Build and Execute commands. e). IDE color schemes. 12. WHAT YOU HAVE LEARNED This section provides a summary of the major concepts covered in the tutorial. 13. SOME CLOSING THOUGHTS This section provides the reader with some helpful “wisdom” about learning the Visual C++ environment before undertaking serious study of C/C++ programming. The following list is a summary of the concepts and techniques that are learned after completing the Microsoft Visual C++ 6.0 IDE Tutorial. 1. The four major steps in writing a C/C++ program. 2. The meanings of the terms “Edit”, “Compile”, “Link”, and “Run”. 3. The meanings of the terms “source code”, “object file”, and “executable file” and the file extensions associated with them. 4. The meanings of the terms “console-mode” and “Win32 console-mode” programs. 5. The four major IDE screen areas. 6. The steps required to create an empty Project for a Win32 Console Application. 7. The meanings of the terms “Project” and “Workspace”. 8. The major files that are internally generated by Visual C++ when an empty Win32 Console Application Project is created. 9. The purpose, significance, and file extensions associated with the “Project file”, “Workspace file”, and “Workspace Options file”. 7.861.3 Page Proceedings of the 2002 American Society for Engineering Education Annual Conference & Exposition Copyright Ó 2002, American Society for Engineering Education 10. The name and location of the folder where a program’s executable and object files are stored. 11. How to create a new C/C++ source file and how to determine the appropriate file extension. 12. How to list project files in the Project Window and how to view the contents of project files in the Document Window. 13. How to manually enter a C/C++ source file into a blank document using the built-in editor. 14. The maximum line length that can be entered into a source document without text- clipping or word-wrapping when printed from the IDE. 15. How and when to save your source and Workspace files using the IDE. 16. The advantages of storing Project files on the local hard drive during development and when it is appropriate to store Project files on a floppy disk. 17. How to open a previously created Workspace from a floppy disk or local hard drive assuming all appropriate files exist and how to create a default Workspace when only the source file exists. 18. How to “compile” a C/C++ source file using the “Compile…” command. 19. The purpose of the Output Window and how it helps you detect syntax errors in your source code. 20. How to create an executable file by “linking” object code using the “Build…” command. 21. How to run your programs from within the IDE by using the “Execute…” command. 22. When the “Press any key to continue” message appears. 23. How to switch a running program from a “windowed” session to a “full-screen” session. 24. How to print a source file from within the IDE. 25. How to capture and print program output using a “text screenshot” or “graphics screenshot”. 26. How to open a previously created Project without first starting the IDE and executing menu commands. 27. The meaning and significance of an executable file (standalone application). 28. How to compile and link a program with a single command (Build…) and how to compile, link, and run a program with a single command (Execute…). 29. The three shortcut command icons that are used to compile, link, and execute programs from within the IDE. 30. How and where to change the color scheme of the IDE environment and the effect it has on other Windows applications. Many beginning C/C++ programming students who have used the tutorial in the Engineering Technology Department at the University of Memphis have provided valuable feedback to the effectiveness of the tutorial (and many have suggested additional screenshots and explanations that have been incorporated into the latest version). Many have commented positively on the tutorial’s “attention-to-detail”, leading the reader through a thorough, step-by-step process.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    29 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us