Code: Select all
#include <iostream>
#include <vector>
typedef struct {
__int64 size;
vector<__int64>* numbers;
} num_array;
int main() {
num_array array;
// I know how to do this.
array.numbers->resize(5);
// I don't know how to do this. These both return errors.
array.numbers[0] = 5;
*(array.numbers)[0] = 5;
cout << array.numbers[0];
return 0;
}