g++에서 C++11으로 컴파일하기
조회수 23931회
발생하는 문제 및 실행환경
우분투 12.04에서 제 C++03 컴파일러를 C++11 컴파일러로 바꾸고 싶어요
찾아보니까 옵션을 -std=c++0x
나 -std=gnu++0x
로 주라고 하는데
제 컴퓨터에서는 에러가 났어요.
제가 옵션을 써보질 않아서 정확히 어떻게 쓰는지 모르겠습니다.
도와주세요
C++11의 라이브러리 array를 include한 소스코드
#include <array>
#include <iostream>
int main()
{
std::array<int, 3> arr = {2, 3, 5};
...
}
에러내용
This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
-
(•́ ✖ •̀)
알 수 없는 사용자 -
- 〉
댓글 입력