Skip to content

Instantly share code, notes, and snippets.

Created November 21, 2017 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/7d4dbd4630908bc41eb0cc05998cb69e to your computer and use it in GitHub Desktop.
Save anonymous/7d4dbd4630908bc41eb0cc05998cb69e to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int ile;
int main()
{
cout << "Ile liczb w tablicy: ";
cin>>ile;
//dynamiczna alokacja tablicy
int *tablica;
tablica=new int [ile];
//pokaz kolejne adresy komorek w tablicy
for (int i=0; i<ile; i++)
{
cout<<(int)tablica<<endl;
tablica++;
}
delete [] tablica;
tablica=NULL;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment