Programming Reference/Librarys
Question & Answer
Q&A is closed
/* * isascii example code * http://code-reference.com/cpp/cctype/isascii */ #include <iostream> /* including standard library */ #include <string> #include <cctype> using namespace std; int main ( void ) { int i; string str="Test ÖÄ%1"; for (i=0; i <= 11;i++) { if ( isascii(str) != 0 ) { cout << "character" << i << " isascii" << endl; } } return 0; }
output: character 0 isascii character 1 isascii character 2 isascii character 3 isascii character 4 isascii character 9 isascii character 10 isascii character 11 isascii