How can I make a variable visible on different C++ source files? In other words, can I declare a variable with a scope that's wider than the "file" level? I understand it's a basic question but both my book and a friend of mine that used to be a professional c programmer weren't able to give me an answer, and I didn't find anything on the FAQ. I am writing something with QT 3 , and I need to pass some variables contained into a machine-generated ui source file (qtballit.ui.h) to another one (trajectory.ui.h) . 10x in advance!