我无法通过 clang++ 克服这个“C++ 需要所有声明的类型说明符”问题请建议使用 clang++ 克服这个错误。我非常感谢你看它
:>clang++ --version
clang version 3.1 (tags/RELEASE_31/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
:>cat f.cpp
main(int argc, char** argv)
{
int A;
}
:> clang++ f.cpp
f.cpp:1:1: error: C++ requires a type specifier for all declarations
main(int argc, char** argv)
^~~~
1 error generated.
:> clang++ f.cpp -std=gnu++98
f.cpp:1:1: error: C++ requires a type specifier for all declarations
main(int argc, char** argv)
^~~~
1 error generated.
:> clang++ f.cpp -std=c++11
f.cpp:1:1: error: C++ requires a type specifier for all declarations
main(int argc, char** argv)
^~~~
1 error generated.
:> clang++ f.cpp -std=c++0x
f.cpp:1:1: error: C++ requires a type specifier for all declarations
main(int argc, char** argv)
^~~~
1 error generated.