Original Post
okay I got it, you just extern them below was my problem ---------------------------------- Hi, I'm working on my map editor for my game. and I have encountered problem with global variable I made two global variables: offsetx, offsety I have made my program to pass these variables to my functions, but I still want to know why it didn't work Here's what I did I put the global variables into a header include that header on my main.cpp my eventctrl.cpp would say these vars are not declared but if I include the header to eventctrl.cpp as well, the compiler tells me multiple declaration detected. In that sense, what's the point of a global variable -_- Is there ways around it? Or should I just stick to passing in variables to multple functions, or even better, classes~~ [Edited by - polarboy on December 24, 2008 9:05:52 PM]