im pretty new to C++ programming and i have a few errors that i just cant solve on my own.
Here is my code. Everything in the File main.cpp (i already tried to split it up in 3 different files, including a header File. Tough the Error stays the same.)
I want to build a class using different mathematical formulas. Now to not use an object i use the keyword static.
As i understand this should help me to use methods of a class without creating an object.
Error: D:/eclipse/workspace/test/Debug/../main.cpp:28: undefined reference to `Math::a'
First Question is, how can i access (read/write) this static Array.
And 2nd Question is, is it true (could test it myself if i could read the array) that static arrays are initialised with Value 0 at start?
As far as i understand the whole class thing, my function printArray is public.
And a public function should be allowed to read private attributes of the same class?
So how i understand it, in the function printArray i am inside the classes scope?