Changes between Version 25 and Version 26 of ResumedC
- Timestamp:
- May 26, 2009, 3:21:14 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ResumedC
v25 v26 112 112 113 113 114 ==== Void ==== 115 * In a function declaration means that the function returns no value 116 * When used in a pointer declaration (called ''pointer to void''), void defines a generic pointer, so it returns an address, it is commonly used when a function is called with differents types of data, and also very used on these ways: 117 {{{ 118 #!C 119 void *malloc( unsigned int ); /* function prototype for malloc */ 120 121 string_ptr = malloc(80); /* We call malloc in order to allocate 80 bytes of memory, 122 it returns the address obtained, that is copied to the 123 string_ptr variable (so, the pointer to this address) */ 124 }}} 125 126 114 127 115 128 … … 194 207 195 208 ==== Prototype of Functions ==== 196 When there's no arguments for the function, just use the void value209 When there's no arguments for the function, just put a ''void'' itself inside the (), so for the content of arguments. 197 210 198 211 When there's arguments, you should add too a name of variable after it, the mean of this is just to be more easy to understand when reading the headers file for example