CHAPTER 1
Hello C++!
9
4.
Click OK to create the project.
The wizard correctly initializes all the compiler settings for a console project.
editing the C++ source code
The wizard creates a project for you with all the files needed for a simple console application. It also
opens the main source file in the editor that contains just the code we want.
Notice that the keywords automatically appear in blue (provided that you spell them correctly).
There are a few things in the automatically generated source code that we don’t need, so let’s
remove them. This will give you some practice in using the editor as well as making the code easier to
understand. The application is not going to receive any command-line arguments when you run it, so
remove everything between the opening and closing parentheses following main—in this example,
array ^args. In addition, the “L” before the “Hello World” string isn’t necessary
either (for reasons that I’ll explain later), so you can remove that, as well.
Do'stlaringiz bilan baham: |