one last thing i would like to do is to call print all of the variables from one of the struct so i tried modifying the cout part of the code like this:
We'll wait a second that loop shouldn't be used for printing elements, I would advice you to remove all that cout stuff from that loop , and if you want to print the individual objects pass the array to a function defined to do that
void printall ()
{
///use a loop to print all data;
}
void printone (DVDdata array [], int size)
{
int index;
std::cout <<"enter the index you want to print :";
std::cin>> index;
if (index>=0&&index <size)
{
std::cout <<array [index].title ;.....///others
}
else
std::cout <<"index not found\n";
}
///BUILD On that