I want to create a few big arrays filled with variables,
to make sure, that my main.cpp file is easy to overview
I want to create/define/declare these variables in another .cpp file
and access these variables in my main file.
If I create one variable in this extern test.cpp file like
First don't include source files, add the source files to your project.
Second avoid global variables as much as possible.
Third prefer std::vector to arrays whenever possible.
If you must use global variables then in one file create the variable without the extern qualifier. Then in every file that requires that variable declare the variable with the extern qualifier.
Very nice, that I've never heard of vector in university.
Is it also possible to initial a 2 dimensional vector and acces
its elements the same way like of a 2 dimensional array?
and can i "cout" als of the 2 dim vector with two for loops?