I have two vectors (secid (string) and close (double)). The program must read a value that the user inputs for secid and find the close values associated with that secid. Example data below.
Currently I can find the first instance of the secid and output the close for that single instance. I would like for the program to output all of the instances for that secid. Can anybody help?! My code currently is shown below:
int main()
{
string inputsecid;
double temp = 0;
cout<<"please enter secid"<<endl;
while (cin>>inputsecid) {
temp = find_secid(secid,close,inputsecid);
if (temp==-1) {
cout<<"Not a real secid"<<endl;
}else{
cout<<"close"<<temp<<endl;
}
}
return 0; // program end
}