24/03/2012, 16:59
|
| | Fecha de Ingreso: diciembre-2011
Mensajes: 16
Antigüedad: 13 años, 1 mes Puntos: 0 | |
Respuesta: Instanciar array ayudaa fjate este es el codigo que tengo..
#include <iostream>
#include <string>
using namespace std;
class calles
{
public:
int lugar_1;
int lugar_2;
string nombre_calle;
int zombie;
};
int main()
{
int p;
cout<<"cantidad de calles que se conectan: ";
cin>>p;
calles* A[p-1]=new calles();
system("pause");
return 0;
}
me muestra este error... te agradezco la ayuda
22 C:\Documents and Settings\USUARIO\Escritorio\zom.prueba.cpp variable-sized object `A' may not be initialized |