Created
August 13, 2015 08:05
-
-
Save derofim/6d181eb5419141574b73 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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