Friday, February 19, 2010

inline void func(void) { cout << "printing inline function \n"; }

or by including the function declaration and code body within a class:

class test

{

public:

void func(void) { cout << "inline function within a class.\n"}

};

Q. If I don't specify either public or private sections in a class,

what is the default?

A. In a class, all members are private by default if neither public nor

private sections are declared.

Q. What does the _seg modifier do?

A. Using _seg causes a pointer to become a storage place for a

segment value, rather than an offset ( or a segment/offset ).

For instance, if "int _seg *x" contains the value 0x40,

then when you use "*x", the value pointed to will be at

segment 0x40, offset 0. If you add a value to the pointer,

the value is multiplied by the size of the pointer type. That

new value is used as an offset, and is combined with the segment

value contained in the pointer. For instance,

int _seg *x;

int value;

x = (int _seg *)0x40;

value = *(x + 20);

No comments:

Post a Comment