can anyone help me to write this program please

hello everyone i am beginner in c++ and i am new in this site
my name is mustafa i am from egypt and i have question
i want program to accept the names of 5 students and store them in one dimensional array,then accept a student name from the user and search for the name in the array
please solve this question :D
Last edited on
what have you got so far?
i know how to accept the names of 5 students and store them in one dimensional array,then accept a student name from the user but i cant search for name i did the last by use string and i make this if to linear search for the user enter
cout<<"plz enter what you looking for ";
cin>>x;
for (int i =0;i<size;i++)
{
if(arr[i]==x)
cout<<i;
}
but it doesn't work
but it doesn't work

You really haven't given us enough information to help. For example, how do you populate your array with the five names in the first place?
Post a proper segment of code please?
Topic archived. No new replies allowed.