I need help to understand the basics of struct when used as pointer and then using its elements via c++ commands like cin etc.
Please also let me know if you think initialization is wrong. The basic idea of this exercise is to make 'A' of certain Size as defined in Struct Array.
Please dont use malloc etc as i am aware of doing this via C.
Thank You !!!
struct Array{
int *A;
int Size;
int Length;
};
int main()
{
struct Array *arr;
cout << "Enter the size of array " << endl;
arr = new Array();
cin >> arr->Size;
cout << "Hello world!" << endl;
return 0;
}