Hey guys im having a problem in structures..
i dont know how to initialize a an array of 10 contact instances.. plz help me out.
this is my question statement..
"Declare a structure Contact that has a name, address, mobile number. Now create and (hardcoded) initialize an array of 10 contact instances. Prompt the user to enter the starting letters of the name to be searched. Your program must now print the details of only those contacts whose name start with the letters specified by the user. E.g. if the user enters Sa (independent of case) then your program will print all that contacts whose name start with sa i.e. saima, sara, saad, sarmad etc. but if user entered sar then only sara and sarmad would be printed "
#include<iostream>
#include<conio.h>
#include<string>
using namespace std;
int main()
{
struct MyStruct
{
string name;
string address;
string mobno;
} ms; //ms is my instance
getch();
return 0;
}
my structure includes.