I have a 2 dimensional array of structures, like so:
struct foo {
int bar;
float baz;
};
I'm actually learning about OS development right now, and one thing I'm trying to do is created a 2d array of these structures with the dimensions 80x25:
struct foo foobar[80][25];
Though I need to set it to the address 0xb8000
, since this is where the video memory starts. Is there any way I can specify the address in which my array starts?
So far I have tried doing this:
struct foo foobar[80][25];
*foobar = (struct foo) 0xb8000;
But this doesn't work. Edit: also, is doing something like this legal and/or possible to the c99 standard?