I am curious if its possible to create a structure for an small SDK smiliar to that of java for C/C++. IE a System.Out.prin tln() that prints a statment in c?
I would guess i would have to use a struct to create system first but how would i nest the other structs beneath it, and could i still access the functions in the same manner.... System would have a Timer() function as well as Out witch is another Struct ... Is this possible.. If this has already been done please let me know.
EDIT:
Could i do the above if i did it as follows?
[code=c]
typedef struct System {
} System;
typedef struct Out System{
void println();
} Out;
[/code]
I would guess i would have to use a struct to create system first but how would i nest the other structs beneath it, and could i still access the functions in the same manner.... System would have a Timer() function as well as Out witch is another Struct ... Is this possible.. If this has already been done please let me know.
Code:
typedef struct System {
typedef struct Out {
void println();
} System;
}System.Out; // i know this is inproper ... it is for example only...
Could i do the above if i did it as follows?
[code=c]
typedef struct System {
} System;
typedef struct Out System{
void println();
} Out;
[/code]
Comment