Denke auch, dass das Problem woanders liegt
Code:
#include <iostream>
using namespace System;
using namespace std;
int main(array<System::String ^> ^args)
{
int agentsCount;
int *agentx, *agenty;
cout << "Anzahl der Agenten: ";
cin >> agentsCount;
agentx = new int [agentsCount];
agenty = new int [agentsCount];
for (int a = 0; a < agentsCount; ++a)
{
agentx[a] = a;
agenty[a] = a;
}
for (int i=0 ; i < agentsCount ; i++)
{
cout << "x:" << agentx[i] << endl;
cout << "y:" << agenty[i] << endl;
}
char text[4];
while(strcmp(text, "q"))
{
gets(text);
}
return 0;
}
funktioniert einwandfrei
