Saturday, 17 August 2013

How to Create Structure in C++

typedef struct _ANSWER_{
char answer,
char *message,
int correct, // Cosmetic flag, to give a red or blue
answer
int height // Maybe if you want in the future, give a
ponderated height to every response
} *PANSWER, ANSWER;
and declare a set of answers
PANSWER answerPool = {
{’T', “Not, the anser is not correct”, FALSE, -10},
{’F', “Yes, is correct”, TRUE, 10},
};

No comments:

Post a Comment