Hello out there!! I am trying to search a string for the proper format of a date and time...... My date will simply be: ##/##/#### and my time will simply be ##:##A.M. or P.M.
I am thinking I can use something like :
size_type find_first_of(CharType ch,
size_type indx = 0) const;
//Returns the index of the first occurrence of ch within the invoking string. The search begins at index indx. npos is returned if no match is found.
//my date is string the_date and my time is string the_time -- so could I do????>>>>>>
size_type find_first_of(CharType ##/##/####, size_type indx = 10) const
Or would this be better:
size_type find_first_not_of(
const string &str,
size_type indx = 0) const;
//Returns the index of the first character within the invoking string that does not match any character in str. The search begins at index indx. npos is returned if no mismatch is found.
size_type find_first_not_of(const string &date, LOST HERE DON'T KNOW PROPER SYNTAX)
Obviously greatly confused any Help appreciated as always Thank you
-RICK