편집 기록

편집 기록
  • 프로필 알 수 없는 사용자님의 편집
    날짜2018.06.21

    g++에서 C++11으로 컴파일하기


    발생하는 문제 및 실행환경

    우분투 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.

  • 프로필 이대산님의 편집
    날짜2016.01.27

    g++에서 C++11으로 컴파일하기


    발생하는 문제 및 실행환경

    우분투 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.