I'm a c++ beginner, I want to initialize an array so that the element of the array is actually a reference to a variable.
string string_1;
string string_2;
string strings[2] = {&string_1, &string_2};
Is this allowed? So any operation done to the array will be applied to the variables string_1
and string_2
themselves?