Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

convert char to int c++

char a = '6'; //bounded by 0 and 9
int n1 = a - '0'; 
int n2 = a - 48; 
int n3 = std::stoi(&a);
 
PREVIOUS NEXT
Tagged: #convert #char #int
ADD COMMENT
Topic
Name
6+7 =