![]() |
| | #1 |
| Registered User Join Date: Jun 2008
Posts: 8
| just a quick question, what happens to variables of this kind in C compiler, defaults to system int? I am just adapting the zlib compression example zpipe.c: Code: int ret, flush;
unsigned have;
z_stream strm;
...
have = CHUNK - strm.avail_out;
if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
thanks |
| lordmule is offline | |
| | #2 | |
| Webhead Join Date: Jul 2009
Posts: 278
| Quote:
The default in C is the signed int which allows you to hold both negative and positive values. | |
| Spidey is offline | |
| | #3 |
| Registered User Join Date: Jun 2008
Posts: 8
| |
| lordmule is offline | |
| | #4 |
| and the Hat of Guessing Join Date: Nov 2007
Posts: 8,740
| The part of the C syntax that says that "unsigned" and "unsigned int" refer to the same type (in the same way that "int" and "signed int" refer to the same type). |
| tabstop is offline | |
| | #5 |
| Registered User Join Date: Jun 2008
Posts: 8
| excellent. thanks for that. |
| lordmule is offline | |
| | #6 |
| C++0x User Join Date: Nov 2008 Location: Sweden
Posts: 133
| Note however that this does not stop you from saying unsigned char for example.
__________________ I like squirrels |
| Tux0r is offline | |
![]() |
| Tags |
| compiler, syntax, unsigned, zlib |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| more then 100errors in header | hallo007 | Windows Programming | 20 | 05-13-2007 08:26 AM |
| We Got _DEBUG Errors | Tonto | Windows Programming | 5 | 12-22-2006 05:45 PM |
| Converting a circulating mouse pointer to use a Potentionmeter | phoenix23 | C Programming | 16 | 10-29-2006 05:04 AM |
| Using VC Toolkit 2003 | Noobwaker | Windows Programming | 8 | 03-13-2006 07:33 AM |
| Dikumud | maxorator | C++ Programming | 1 | 10-01-2005 06:39 AM |