![]() ![]() That will compile and run your program and pop up a console window to show you the program's output.īelow is the source code for our first example program. To run your program, click on Start Without Debugging in the Debug menu.Then, create a second empty text file named "copy.txt" in your project. Type a list of numbers into numbers.txt.In the dialog that appears, select the Utility category and then select the option to make a new, empty text file. Right-click on the project in the solution explorer and select the option Add/New Item.To add a text file to the project, select the project itself in the solution explorer: Since the example program needs to work with a couple of text files you will next want to add those to the project.Copy and paste the code from the Source Code section below into that empty source code file. You should now have a new, empty source code file open in the Visual Studio editor.At the bottom in the name field, type the name 'main.cpp'. ![]() In the dialog that appears, click the Code template category on the left and C file in the center panel.Right-click on the Source Files folder in the Solution Explorer pane and select the option Add/New Item. ![]() You should now have a new, empty project. ![]() In the second screen of the Application Wizard click the Empty Project option and click Finish to dismiss the dialog. Click Next on the first screen of the Application Wizard. Place the project folder in a location that you can find again later. At the bottom of the window type a name for your project and click the Browse button to select a location for the project folder.
0 Comments
Leave a Reply. |