Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <conio.h>
- using namespace std;
- void correct(int** x)
- {
- if(**x < 0 )
- *x = NULL;
- cout << *x;
- }
- int main()
- {
- int a;
- int* b = &a;
- int**c = &b;
- cin >> a;
- correct(c);
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment