c++ – String to integer translation


Please tell me the functions for converting the string type to integer in C ++ Here is an example, in fact, you need to drive a number from S into N

#include <string>
int main()
    string S="74";
    int N;

    return 0;


#include <stdlib.h>

n = atoi(S.c_str());
Scroll to Top