K
kselvaakumar
I have declared a global structure like this:
struct
{
float a;
float b;
}static one;
This is in a separate header file file1.h;
Now how can i initialise those variables one.a and one.b in another
cpp file.
Since it has been declared as static, I couldnt make it as extern.
Moreover I dont want to declare any object to that structure.All the
variables one.a and one.b are treated as constants.
I want to simply use it as one.a and one.b with the structure name
itself.
Can u please help in achieving this??
Thanks
Selva
struct
{
float a;
float b;
}static one;
This is in a separate header file file1.h;
Now how can i initialise those variables one.a and one.b in another
cpp file.
Since it has been declared as static, I couldnt make it as extern.
Moreover I dont want to declare any object to that structure.All the
variables one.a and one.b are treated as constants.
I want to simply use it as one.a and one.b with the structure name
itself.
Can u please help in achieving this??
Thanks
Selva