Header variable reference bug June 07, 2012 05:56PM | Registered: 13 years ago Posts: 363 |
#ifndef common_h #define common_h bool debug; #endif
include common.h bool *myboolv; void store( bool *boolv ){ myboolv = boolv; } void check_value(){ if( *boolv == true) { /* crashes on this if statement */ } } void main(){ store(&debug); check_value(); }
Re: Header variable reference bug June 07, 2012 10:52PM | Moderator Registered: 15 years ago Posts: 686 |
Re: Header variable reference bug June 08, 2012 04:29AM | Registered: 13 years ago Posts: 363 |