Answers for "stoi library in cpp"

C++
2

stoi cpp

// convert Binary to Decimal in cpp
#include <bits/stdc++.h>
using namespace std;

int main(){
    char ch[] = "111";
    cout<<stoi(ch , 0 ,2);
    return 0;
}
Posted by: Guest on July-14-2021

Browse Popular Code Answers by Language