Blog for tranning to technical
Thursday, August 13, 2009
stringToLong
long SDBUtil::stringToLong(char* data) {
for(char* p = data; *p; p++) {
if (!isdigit(*p)) {
throw strdup("Input wrong integer");
}
}
return atol(data);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment