April 27, 2015
2:22 a.m.
On Mon, 27 Apr 2015 00:16:59 +0530, harshkdev said:
struct kvm; struct kvm_vcpu;
Generally we declare structure and its member at same place.
It's a forward declaration. Consider two structures that have pointers to each other: struct a { int b, c, d; struct *b b_ptr; } struct b { int foo, bar, baz; struct *a a_ptr; } Now, the struct *b in the first structure won't compile because it hasn't seen b yet. So we stick a 'struct b;' in front both of them so struct a can compile successfully.