I am trying to find if there is better way to check if the string has special characters. In my case, anything other than alphanumeric and a \'_\' is considered a special charac
You can use something like this:
#include for(int i=0;i
The isalpha() function checks whether it is alphanumeric or not and isdigit() checks whether it is digit.
isalpha()
isdigit()