Ayuda porfavor, nose porque hay un error

 ayuda con este problema en Visual Studio 2017 :

Excepción producida en 0x773DE486 (ntdll.dll) en ConsoleApplication1.exe: 0xC0000005: Infracción de acceso al leer la ubicación 0x02D8CB56.

aca el codigo:

#include “stdafx.h”
#include <iostream>
#include <conio.h>

using namespace System;
using namespace std;

void main()
{
int n;
int *enc1 = new int[n];
int *enc2 = new int[n];
int *enc3 = new int[n];
char opciones[2] = { ‘s’,‘n’ };
do
{
cout << "Ignrese n: ";
cin >> n;
} while (n>30&&n<1);
Random x1;
Random x2;
Random x3;
for (int i = 0; i < n; i++)
{
cout << "Encuestado " << i + 1 << "Marque <s> o <n> " << endl;
enc1[i] = char(opciones[x1.Next(2)]);
cout << "Consume enc1: " << char(enc1[i]) << endl;
enc2[i] = opciones[x1.Next(2)];
cout << "Consume enc2: " << enc2[i] << endl;
enc3[i] = opciones[x1.Next(2)];
cout << "Consume enc3: " << enc3[i] << endl;
}

_getch();
}

Hello PieroCarrion,

Thanks for participating!

We take our Code of Conduct very seriously and want to help ensure that everyone has a good experience free of antagonism and harassment. Unfortunately, we don’t currently have moderators for languages other than English. What this means is that, until that changes, we need to ask that everyone use English here in the GitHub Community Forum when posting. We’ll be locking any posts in languages other than English for now, including this one.

Thanks for meeting us halfway

1 Like