Int in Struct having problems

Aug 19, 2013 at 5:04am
I'm currently working on something where I have structs in structs, and I'm fine with the strings, but the ints don't work.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  struct questionEffect {
    signed int PREffect;
    signed int fanSupport;
};

struct response {
    string responseText;
    string responseShort;
};

struct question {
    string questionText;
    response responses[4];
    questionEffect effects[4];
};

question negativeQuestions = {"", {{"", ""}, {"", ""}, {"", ""}, {"", ""}}{{-25, 25}{-10, -10}{10, 5}{-5, -5}}};
Aug 19, 2013 at 5:08am
closed account (N36fSL3A)
You mean struct objects in structs. What you said is impossible (I think).

And you really didn't tell us what's not working. Explain.
Aug 19, 2013 at 5:16am
closed account (28poGNh0)
I think your only problem is that you missed a couple of commas
put this line instead of yours
1
2
question negativeQuestions = 
{"", {{"", ""}, {"", ""}, {"", ""}, {"", ""}},{{-25, 25},{-10, -10},{10, 5},{-5, -5}}};
Aug 19, 2013 at 5:31am
Thanks Techno01, That was it.
Topic archived. No new replies allowed.