StreamKid wrote:
why is a segmentation fault caused in this simple thing??? and what exactly is this kind of error??? sorry, n00b things :/****************************************************** *#define DEBUG *#include <cstdio> * *#define assert( x ) \ * if( ! ( x )) \ * { \ * printf( "\nERROR!! Assert %s failed", #x ); \ * printf( "\n on line %s", __LINE__ ); \ * }
Your error is on the __LINE__ printf. __LINE__ isn't a C style string, its an integral type (the exact flavor escapes me at the moment). %s is the wrong format. This is why, in C++, it is recommended that you avoid printf and friends, and use iostreams instead. _______________________________________________ help-gplusplus mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gplusplus
