I have an input argument string const char* s I know that it starts the sequence of chars which are integers representation ,this sequence could be of any length ,
const char* s
atoi() should do what you want to, although a more robust implementation would use strtol().