03.12.2015, 01:44
Vale, y ya esta ъltima duda a que se refiere con esto..
Quote:
Originally Posted by ******
Brackets
If the parameters are so flexible, how can you actually control what gets output? All the macros so far have been very bad - they didn't use brackets. Compare the following two macros: Код:
// Without brackets (first). #define MULTIPLY_TWO_A(%0,%1) %0 * %1 // With brackets (second). #define MULTIPLY_TWO_B(%0,%1) ((%0) * (%1)) main() { // Two with first. printf("%d", MULTIPLY_TWO_A(6, 7)); // Two with second. printf("%d", MULTIPLY_TWO_B(6, 7)); // Three with first. printf("%d", MULTIPLY_TWO_A(6, 7, 8)); // Three with second. printf("%d", MULTIPLY_TWO_B(6, 7, 8)); } |