I am using Code::Blocks with MinGW (GCC version 4.9.2) and have the -std=c++11 flag enabled in compiler settings, but if I try to build this code it keeps telling me that stof was not declared in this scope..
If I use stf::stof the error is: 'stof' is not a member of 'std'
#include<iostream>
#include<string>
int main(){
float a = stof("625.5");
}
Do I need to enable the c++11 flag somewhere else or what can be the problem?
Aucun commentaire:
Enregistrer un commentaire