How to assert char array or not, check if a char array start with “0” or contain “0”

I got a function that turn char array into integer, how to check if a given array is char or not to assert code, how to check if that char array is starts with, contain "0". And this an example of my code :
thank you
---------------
void arrToString(char sArr[]) {
// integer array declare
int iArr[strlen(sArr)];
assert(!isdigit(sArr)); // what are the conditions that I should put
for (int i = 0; i < strlen(sArr); i++) {
iArr[i] = sArr[i];
cout << sArr[i];
}
}

int main() {
char stringArr[] = "121212";
arrToString(stringArr);
}
Last edited on
Topic archived. No new replies allowed.