|
|
|
|
|
|
|
|
_timer TOOK[8];
#include "quarks.cpp"
_timer TOOK[8];
in one source file.
|
|
So, no one yet knows how to have global variables available to all files? |
"No, don't include cpp files." If I do not include the .cpp file I get "undefined reference) |
"Post the exact error message and your build command." If you try running the code you would see the error. I am using whatever Microsoft does when I press "Build". |
"I'm a bit confused why "constants.h" has an include guard named "globals_H_"" I get redefined errors if the guard does not exist. |
#ifndef DUTHOMHAS_QUUXER_HPP
#ifndef DUTHOMAHS_FOOZLE_HPP
"The minimum change to your code to resolve the problem is to change constants.cpp. Just add the following line before 'int CONSTANTS()':" Tried that, made no difference. |
"I am not sure why you have a function named CONSTANTS." I am assigning values to several cells of several arrays and using a function saves space. There are thousands of more lines of code in my original written in AGK basic, which works just fine. |
So, no one yet knows how to have global variables available to all files? |
|
|
... some identifiers are reserved for use by C ++ implementations and shall not be used otherwise; no diagnostic is required. Each identifier that contains a double underscore __ or begins with an underscore followed by an uppercase letter is reserved to the implementation for any use. Each identifier that begins with an underscore is reserved to the implementation for use as a name in the global namespace. - IS |
Whatever I try I either get "unresolved external symbol", "undefined symbol" or "already defined in ____". |
If I do not include the .cpp file I get "undefined reference) |
|
|
|
|
|
|
|
|