在Linux系统中,您可以使用以下方法之一来查看g++的版本:
g++ --version
这将显示您的系统上安装的g++编译器的版本信息。例如:
g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.