0
what's 'top searching' algrorithm look alike?
what's 'top searching' algrorithm look alike? I mean when I type 'a' it thens appear 'ant' , 'auction' or other word I 'string'.The point is that word must start with a letter I entered. is it something like string b; string a [3] = {aspirin , ant , auction , ambious}; cin>>b; if (b == a ) cout<<a[0] , << a[1] ,<< a[2] , <<a[3]; ps.my language is c++ and I am still very noob about it , thanks.
2 Respostas
+ 3
Please mention your referenced language C++ in Relevant Tags and remove the 'helpmepls' word.
Thank you for understanding 👍
+ 2
string b;
string a[4] = {"aspirin ", "ant ", "auction ", "ambious"};
cin>>b;
if (b == "a")
cout<<a[0]<<a[1]<<a[2]<<a[3];