| DeepBlack (36) | |||||
|
I am modifying a set of static variables inside of the class's member function. The static variables are private. An example of what I'm doing is as below, utilities.h -----------
utilities.cpp -------------
I get a compilation error in the function void utilities::parse_details(char* filename)
which says: undefined reference to `utilities::num_nodes' can someone give me some pointers on how to solve this? compiler: g++ | |||||
|
|
|||||
| vlad from moscow (3654) | |
|
You only declared the static member but did not define it. Include in the cpp file the following statement int utilities::num_nodes; | |
|
Last edited on
|
|
| DeepBlack (36) | |
|
Thanks indeed, that worked! | |
|
|
|