Using sscanf to check if a string follows a format
#1

This is the line I'm trying to do:

Код:
if(!(sscanf(dateofbirth, "d/d/d", given_day, given_month, given_year))) ToggleFlagOnMask(errorMask, MA_CHRCREATION_ERR_DOB_WRONG_FORMAT, true); printf("Format 1: %d || Format: %d/%d/%d", errorMask, given_day, given_month, given_year);
Trying to basically get this to get the day, month and year in that order (DD/MM/YYYY) but at the same time check that the "/" symbols are in place.

Any ideas?
Reply


Messages In This Thread
Using sscanf to check if a string follows a format - by BKarner - 27.09.2015, 19:57
AW: Using sscanf to check if a string follows a format - by Kaliber - 27.09.2015, 20:01
Re: AW: Using sscanf to check if a string follows a format - by BKarner - 27.09.2015, 22:00
Re: Using sscanf to check if a string follows a format - by IstuntmanI - 27.09.2015, 22:40

Forum Jump:


Users browsing this thread: 3 Guest(s)