Struct constructor stores wrong addresses?

I'm doing a menu with few choices - the code is literally the same for all menu items, however one of the menu items (Software - Applications, 66. line) stores different memory addresses when passing &Question[i] to it

code -> http://pastebin.com/PEbBYWgr

screenshot of console output
http://i.imgur.com/QDa3jQI.jpg

the header is only
1
2
3
4
#pragma once

struct Question;
struct Option;
Last edited on
Calling std::vector::push_back() may invalidate pointers to elements of the vector, if the vector needs to be reallocated to accommodate the new element. Your Option objects hold such pointers, and you're calling push_back() after constructing them.
Last edited on
Topic archived. No new replies allowed.