I want to convert string to float with stof but it is not working
Also I was enabled c++ 11 in codeblocks
but give error me that "stof was not declared in this scope"
if I use of std::stof yet give error me that it is not member of std
Here is my code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string x;
x="23";
float y=stof(x)+2.1;
cout<<y;
return 0;
}