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; }
1 Antwort
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.