Skip to content

Instantly share code, notes, and snippets.

@derofim
Created August 13, 2015 08:05
Show Gist options
  • Save derofim/6d181eb5419141574b73 to your computer and use it in GitHub Desktop.
Save derofim/6d181eb5419141574b73 to your computer and use it in GitHub Desktop.
#include <iostream>
int main()
{
int* p0 = new int;
double* p1 = new double[5];
auto p = new auto ( 7 );
*p0 = 2;
p1[*p0] = 5;
std::cout << *p << std::endl; // Вывод: 7
std::cout << p1[2] << std::endl; // Вывод: 5
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment