to_string is not a member of std, says g++ (mingw)

前端 未结 13 1152
不思量自难忘°
不思量自难忘° 2020-11-22 05:41

I am making a small vocabulary remembering program where words would would be flashed at me randomly for meanings. I want to use standard C++ library as Bjarne Stroustroup t

13条回答
  •  逝去的感伤
    2020-11-22 06:01

    Change default C++ standard

    From (COMPILE FILE FAILED) error: 'to_string' is not a member of 'std'

    -std=c++98

    To (COMPILE FILE SUCCESSFUL)

    -std=c++11 or -std=c++14

    Tested on Cygwin G++(GCC) 5.4.0

提交回复
热议问题