cprintf(%c,196);
Printable View
cprintf(%c,196);
It means, that someone who wrote this line avoids to read the documentation.
Please, read MSDN:
http://msdn.microsoft.com/en-us/libr...71(VS.80).aspx
http://msdn.microsoft.com/en-us/libr...dt(VS.80).aspx
PS. If you are using some other compiler (non-Microsoft) - then tell us which one.
As stated, this is an invalid statement. I presume you mean
This is a Posix function that formats and outputs to the console. With Microsoft Visual Studio since the 2005 release this is a depreciated function and _cprintf(..) should be used.Code:cprintf("%c", 196);
In your case this will output the ASCII character coresponding to the decimal equivalent of 196 to the console. The affect of this may vary depending upon which OS you are using (which you don't state). On a Microsoft OS from a console it will display a horizontal line of one character width.
Re my previous post. I hate 'magic numbers' in code. You might find below of use :cool:to make the code more readable (for Microsoft console).
Code:#define CON_SL_TL 218 //Single top left
#define CON_SL_TR 191 //Single top right
#define CON_SL_BL 192 //Single bottom left
#define CON_SL_BR 217 //Single bottom right
#define CON_SL_VERT 179 //Single vertical
#define CON_SL_HOR 196 //Single horizontal
#define CON_SL_LT 195 //Single left tee
#define CON_SL_RT 180 //Single right tee
#define CON_SL_TT 194 //Single top tee
#define CON_SL_BT 193 //Single bottom tee
#define CON_SL_X 197 //Single cross