I just started coding so sorry if the code is too convoluded or messy, any tips are preciated
#include <iostream>
using namespace std;
class Nacion {
public:
string nombre;
string tematica;
string entorno;
Nacion (string aNombre , string aTematica , string aEntorno){
nombre = aNombre;
tematica = aTematica;
entorno = aEntorno;
}
};
int main(){
int eligNac;
string Categoria;
string Naciones;
Nacion nacion1 ("nombre" , "tematica" , "entorno");
Nacion nacion2 ("nombre" , "tematica" , "entorno");
Nacion nacion3 ("nombre" , "tematica" , "entorno");
cout << "Elije una categoria:\n";
cout << "Naciones\n";
cout << "Campeones" << endl;
cin >> Categoria;
if (Categoria == "Naciones")
{
cout << "Elije una nación:\n";
cout << "1.-Demacia\n";
cout << "2.-Freldjord\n";
cout << "3.-Piltover\n" << endl;
cin >> eligNac >> endl;
if(eligNac = 1){
cout << nacion1 << endl;
}
}
This is the one line of code I have troubles with, I don't know how to display the info of the object when an imput is given