Hello, Good morning, everyone.
I want to assign a new data type of an array, for example:
I want my Array to be of the Person type, but it throws me an error, I've tried it in different ways. I do not know if this can be done?
One of the forms used:
#include <cstdlib>
#include <iostream>
using namespace std;
class Gente
{
private:
public:
string Nombre;
};
int main()
{
Gente[] array = new Gente[2];
array[0].Nombre="Juan";
array[1].Nombre="Pedro";
system("PAUSE");
}
Error: