forked from chronolaw/cpp_study
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.cpp
More file actions
29 lines (21 loc) · 750 Bytes
/
test.cpp
File metadata and controls
29 lines (21 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) 2020 by Chrono
//
// g++ test.cpp -std=c++11 -o a.out;./a.out
// g++ test.cpp -std=c++14 -o a.out;./a.out
// g++ test.cpp -std=c++14 -I../common -o a.out;./a.out
#include <iostream>
//#include "std.hpp"
int main()
{
using namespace std;
cout << "c++ version = " << __cplusplus << endl;
cout << "gcc version = " << __VERSION__ << endl;
cout << "gcc major = " << __GNUC__ << endl;
cout << "gcc minor = " << __GNUC_MINOR__ << endl;
cout << "gcc patch = " << __GNUC_PATCHLEVEL__ << endl;
// check __GLIBCXX__ for macos
#ifndef __GLIBCXX__
# define __GLIBCXX__ "unkown version,please check or config your gcc path,or your OS not surpport."
#endif
cout << "libstdc++ = " << __GLIBCXX__ << endl;
}