Need a project done?

C++ Programming Developer

Search This Blog

Dynamically allocate memory in C++

Dynamically allocate memroy in C++ using following program:


#include <iostream>
using namespace std;



int main(){
int *x = new int [10];
for (int i = 0; i<10; i++)
x[i] = i;
for (i = 0; i<10; i++)
cout << x[i] << endl;

return 0;
}
"Don't let anyone ever make you feel like you don't deserve what you want."