1

I have recently installed Ubuntu 20.04 on my Windows Computer and now want to install C++ 11 compiler on it. I have installed the g++ compiler but now am not able to install or upgrade it ti c++11 compiler. Can someone please tell how to do it?

Alex
  • 9,891
  • 11
  • 53
  • 87
logan007
  • 67
  • 1
  • 10

1 Answers1

2

When you compile use -std=c++11 flag:

g++ -std=c++11 main.cpp

UPD

As per comment below:

-std=c++17 -pedantic
Alex
  • 9,891
  • 11
  • 53
  • 87