CS 115: Introduction to Computer Programming How to Use Visual Studio on Mac

CS 115: Introduction to Computer Programming How to Use Visual Studio on Mac

CS 115: Introduction to Computer Programming How to Use Visual Studio on Mac Visual Studio is a Windows application and has limited functionally on Mac. Basically, what you are getting on Mac is a text editor combined with debugger and terminal (and some other tools). You will have to learn on your own how to use g++ compiler, gdb debugger, and how to execute a program from command line. What is Visual Studio Code? Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS, and Linux. It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Java, Python, PHP, Go) and runtimes (such as .NET and Unity). Begin your journey with VS Code with these introductory videos. 1. Visual Studio Code Download page, it will automatically download the app: https://code.visualstudio.com/docs/?dv=osx 2. Open Visual Studio Code App (initially, it should be in your downloads) 3. Create/open new file 4. Write a C++ program and try to save it using “Save As” option Create a folder CS216 on your Desktop, and save all your programs there. 5. VS Code will ask you to install recommended extensions for C++. Install these extension. 6. Open Terminal in Visual Studio Widow using (Control ~) 7. Change directory using command by typing the following command: cd ~/Desktop/CS216/ 8. To compile your code, use the following syntax: g++ -o [executable_name] [source_file(s).cpp] ex: g++ -o test test.cpp 9. Run your Program by typing the following command in the terminal window: ./[executable_name] ex: ./test 10. You will see the output of your program in the terminal: .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    3 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