Tuesday, February 22, 2022

Compile and Run C++ program on mac (m1)

 Compile and Run C++ program on mac (m1):

#include <iostream>

using namespace std;

int main() {
    cout << "Hello, World!" << endl;
    return 0;
}

g++ -o hello hello.cpp

./hello

No comments:

Post a Comment