[try Beta version]
Not logged in

 
header problems

Nov 17, 2010 at 4:20pm
Hello everybody,I am a newbie and in my program I have somethign like this

// file header_name.hpp
#ifndef header_name
#define header_name

int arr[2][12] = {{some values...},{some values...}};
some classes....

#endif

// file header_name.cpp
#include "header_name.h"
classes implementation...

// main.cpp
and here I want to use the arr array but the compiler says that is previously declared somewhere else...
I want to keep arr as a global variable for all the modules of the program..

wath is wrong with the code? and how can i fix it?
Nov 17, 2010 at 4:55pm
You'll have to post more of your code for us to be able to help. Please put the files into [ code ] blocks.
Topic archived. No new replies allowed.