jeudi 30 novembre 2017

'stoi' was not declared in this scope after using -std=c++11

Most probably this is weird, but when I got this error that stoi wasn't declared in this scope, I smiled because I am familiar with this error and it's solution.

I checked this option have g++ follow the c++11 ISO c++ language standard [-std=c++11] in compiler settings of Code Blocks (16.01, with MinGW) and tried recompiling it, but surprisingly it didn't work and the same error persisted. I tried re-installing CodeBlocks but that didn't work.

Also, I tried with windows power shell and command prompt with gcc math_handler.cpp -std=c++11 but got the same error.enter image description here

What am I doing wrong?

Note: I tried with -std=c++0x too.

Aucun commentaire:

Enregistrer un commentaire