This is a simple question, so it wont take up too much of anyones time.

The Structure 'fd_set' is defined as so:
Code:
typedef struct fd_set {
  u_int fd_count;
  SOCKET fd_array[FD_SETSIZE];
} fd_set;
So the question I ask you is IF my method of increasing the size of 'fd_array' is stable. Here is my method explaining my logic behind it:
Code:
//Lets say that we want fd_array to have 3 index's, 0-2.
fd_set *Set; //Pointer to RealSet eventually.
BYTE RealSet[(3 * 256)+4+4];
//256 is the sizeof fd_array, 4 is the size of fd_count, and the other 4 is the size of the pointer(being Set);
Set = (fd_set *)RealSet;
//Now we can store(without causing a memory leak) 3 SOCKET members in fd_array, if we store something it actually is stored into RealSet, Set is simply a pointer to RealSet.
Set->fd_array[0] = Sock1; //Example
//Or we could use:
Set[0].fd_array[0] = Sock1;
I believe that my method works fine, however, I have two questions regarding my method:
#1. Should RealSet have the size of the Pointer(being 4) also added on to its size?
#2. When increasing the size of a member in a structure, should I be using the size of the member, or the size of the structure(when multiplying. In this case I used 256 which is the size of the fd_array, and 260 is the size of fd_set, and 4 is the size of fd_count, and 4 is the size of the pointer to fd_set).

The reason I ask these questions is to make sure that I will not cause memory leaks in the future when I may have slightly more complicated structures. Thankyou.