I want to run this hello world program which need C++23
import std;
int main()
{
std::cout << "Hello, World!n";
}
I’m on a mac and i enter this into the terminal:
g++-13 -std=c++2b hello_world.cpp -o hello
also tried with -std=c++23
However it gives the error: C++20 ‘import’ only available with ‘-fmodules-ts’, which is not yet enabled with ‘-std=c++20’
Why is it still on C++20?
New contributor
Hello Hello is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.