0

Trying to write a script that prints values to an if statement. Was working then domething went wront near the end. Thanks in advanced!

#include <iostream> using namespace std; #include <string> main(){ string x; string z; int y; string t; for(int i=0; i<6; i++){ cout<<"name"<<endl; cin>>x; cout<<"Pokemon name capatalized"<<endl; cin>>z; cout<<"Pokedex number"<<endl; cin>>y; cout<<"type"<<endl; cin>>t; cout<<"else if(pokename==\""<<x<<"\" || pokename==\""<<z<<"\" || p==\""<<y<<"\")<<{cout<<\"This is "<<z<<"\";"<<endl<<t<<\"();}"<<endl; } } return 0; }

20th Aug 2016, 3:26 PM
Jack Gruber
Jack Gruber - avatar
1 ответ
0
1.I think you should use char in place if string 2. Putting else if syntax in cout<< is kinda an abomination, so try that and let's see.
24th Aug 2016, 10:48 AM
Daniel Ofori
Daniel Ofori - avatar