View Single Post
  #11   Spotlight this post!  
Unread 14-02-2004, 20:33
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: printf isn't printf-ing. Help!

Quote:
Originally Posted by The Lucas
just put:
Code:
extern char counter;
in your header file (user_routines.h). This will make counter a global varable that stays in memory
never put the keyword "extern" in a header file - the whole point of extern is that it points to a variable declared in another file. If you put the "extern"-ed variable declaration in the header file, you'll either have two definitions of the variable, or no definition without "extern" (you always have to have one without extern).

just put "extern" variable declarations at the beginning of an individual file.
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)