So what is the problem exactly?
#include<stdio.h>
extern int foo;
int main( void )
{
if( foo == 4 )
printf( "Mmmyep.\n" );
else
printf( "Mmmnope.\n" );
Type: Posts; User: quzah
So what is the problem exactly?
#include<stdio.h>
extern int foo;
int main( void )
{
if( foo == 4 )
printf( "Mmmyep.\n" );
else
printf( "Mmmnope.\n" );
Define it some place. Extern it some place else:
extern int x; /* means, 'this is declared elsewhere, but i want to know about it / use it */
...
if ( x == 5 )
... do somethingSome other...