// 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; }