hey,thats my first post,i started recently to have for hobby programming,and i am really interesting to learn.
anyway i have a problem i write a program that use some classes objects my problem is probably fundamental but i couldnt find answer on net.
i have one header file that i have class declaration public private etc
example:
header.h
class alpha{
public:
void test();
private:
int x;
};
i have one cpp file that includes that header and has the methods.
#include "header.h"
void alpha::test()
{
something
}
now in my program i want to declare objects in a header so multiple cpp files can read and write and in general work.
program.h
alpha beta();
and cpp1
beta.test();
cpp2
beta.test() change it
sorry for bad form of the post but as i said my first :D
the code is wrong but i wanted you to understand the idea
i used static but when i run it,is like they dont work