Horje
how to grab each character from a string Code Example
how to grab each character from a string
// An easier way to extract each character would be:

string s = "abcde"; 
 
for (int i=0; i<s.size(); i++) { 
    cout << s[i];  
} 
// To test if a particular character is an integer, you would do this:

//test if s[i] is an int from 0-9 
if (s[i] <= '9' && s[i] >= '0') { 
    return true; 
} 




Cpp

Related
run c++ program mac Code Example run c++ program mac Code Example
c++ simple projects Code Example c++ simple projects Code Example
prime number c++ Code Example prime number c++ Code Example
Segmentation fault (core dumped) Code Example Segmentation fault (core dumped) Code Example
memory leak in cpp Code Example memory leak in cpp Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7