Subj : sscanf and bool To : borland.public.cpp.borlandcpp From : MarvinAvery Date : Mon Aug 23 2004 05:18 pm Hi. I am using BC5.02 under Win2K. I have a character string that contains some boolean values: eg. "0010" I want to read these values via the sscanf() function: eg. bool b1, b2, b3, b4; sscanf (line, "%1d%1d%1d%1d", &b1, &b2, &b3, &b4); Problem is "%1d" stores the value as int -- that is as 16 bits whereas the storage location is only 8 bits. So I am getting a buffer overflow. Is there any conversion format that will read and store an 8-bit integer? Any other suggestions? TIA -- Marvin Avery marvin.avery@sdc-dsc.gc.ca .