/* ..CODE.. */
struct st_Settings {
struct {
unsigned int x;
unsigned int y;
unsigned int width;
unsigned int height;
} window;
} defaultSettings;
/* ..CODE.. */
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow) {
using st_Settings; // default settings
{
using window;
{
x = 50;
y = 50;
width = 800;
height = 600;
}
}
/* ..CODE.. */
}
This code doesnt work, and this is my question, can i replace "using" keyword with something else what working with structures?
Okey i have struct like this:
struct
{
struct a
{
int a;
int b;
int c;
}
struct b
{
struct a
{
int a;
int b;
int c;
}
struct b
{
int a;
int b;
int c;
}
}
struct c
{
int a;
int b;
int c;
}
} a;
Did i must do this:
a.a.a = 1;
a.a.b = 12;
a.a.c = 14;
a.b.a.a = 41;
a.b.a.b = 61;
a.b.a.c = 34;
a.b.b.a = 65;
a.b.b.b = 45;
a.b.b.c = 23;
a.c.a = 1;
a.c.b = 0;
a.c.c = 4;
Or it is possible to do something like this:
a.
{
a.
{
a = 1;
b = 12;
c = 14;
}
b.
{
a.
{
a = 41;
b = 61;
c = 34;
}
b.
{
a = 65;
b = 45;
c = 23;
}
}
c.
{
a = 1;
b = 0;
c = 4;
}
}