sdfsd

Installing the C++ Compiler on Mac OSX

Installing the C++ Compiler on Mac OSX

First download VS Code on your device.

You can also Download M1 specific Visual Studio Code(i.e. Visual Studio code- Insiders)

After downloading Visual Studio Code or Visual Studio Code Insiders open it and go to extensions. There is a search tab, just type c++ then click on 1 recommendation and install it. Another extension you have to download is code runner.

During this process, users can come across 2 different types of issues. So let’s discuss what they are and how to resolve them.

Problem 1: After downloading all extensions on VS Code not able to work on CPP.

Follow the below steps to resolve the same issue:

  • Step 1: Open your terminal and run the below command:

arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/  Homebrew/install/master/install.sh)"

  • Step 2: Now after the completion of the previous command type:

arch -x86_64 brew install mingw-w64

Problem 2: #include<bits/stdc++.h> is not found.

If you want to more about the system header file click here. Follow the below steps to resolve the issue:

  • Step 1: Open terminal using command+space and type terminal.
  • Step 2: Now move to the below-given path :

 

Quick Guide Resources Job Search Discussion