Names Data Store Program – Algorithms & Data Structures in C++

#include<iostream>
#include<conio.h>
using namespace std;

int main()
{
string h[4];
string c;
string result[4];
int counter=0;
for(int i=0;i<4;i++){
cout<<“Entering the name”<<i+1<<“=”;
cin>>h[i]; }

for(int k=0;k<1;k++){
cout<<“enter name”<<k+1<<” :”;
cin>>c;

for(int i=0;i<4;i++){
if(c==h[i]){
result[k]=c;
counter++;
}
}
}
cout<<“the names found :”;
if(counter==0){
cout<<“names not found!”;
}
else{

for(int i=0;i<4;i++){
cout<<result[i];
}
}
}