Changes

Jump to: navigation, search

OOP344 Assignment One

30 bytes added, 16:38, 19 December 2009
void io_displayflag(..........)
====void io_displayflag(..........)====
<big>void io_displayflag(const char '''*format''', int '''row''', int '''col''', int '''status''');</big>
Allows the user to display a checkbox at row and col on the screen. Depending on the value of status; being zero or non-zero, the checkbox will be checked or unchecked respectively.
The checkbox will be always shown using 3 characters; two surrounding characters and one character in the middle as the checkmark. If the status argument is zero, then instead of the check-mark a space will be printed on the screen.
The 3 characters held in the '''“format” ''' array; format[0] and format[2] are surrounding characters and format[1] is the check-mark.
The '''const char *format''' is used to specify the character used for the checkbox, so for example if the '''format''' argument is "[X]", then an ''unchecked'' checkbox will be <big><pre>[ ]</pre></big> and a ''checked'' checkbox will be <big><pre>[X]</pre></big>
1
edit

Navigation menu