samedi 11 septembre 2021

how do i fix this no matching function for call to 'stoi(int&)'|

i keep getting this error. i know this is a c++ 11 function but it still isnt working with code blocks c++ compiler. am i using this function correctly of is it a problem with the codeblocks compiler. i tried changing the compiler. using the "have g++ follow the c++11 iso standard" i still keep getting this error. or getting the "stoi() does not exist in the current scope" error

#include <iostream>
#include <string>

using namespace std;

int main()
{
    int test = 34;
    cout << stoi(test);
}

Aucun commentaire:

Enregistrer un commentaire