#include #include using namespace std; int main() { int anzahl = 1000; int *ptr = (int*) calloc(anzahl,sizeof(int)); if (ptr) { ptr[0] = 0; ptr[anzahl-1] = 999; // ... cout << ptr[0] << "..." << ptr[anzahl-1] << '\n'; free(ptr); } else { cerr << "Nicht genug Speicher vorhanden.\n"; } }