chillurbrain

Task2_7_1

Dec 21st, 2015
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <conio.h>
  4.  
  5. using namespace std;
  6.  
  7. void correct(int** x)
  8. {
  9.     if(**x < 0 )
  10.         *x = NULL;
  11.     cout << *x;
  12. }
  13.  
  14.  
  15. int main()
  16. {
  17.     int a;
  18.     int* b = &a;
  19.     int**c = &b;
  20.     cin >> a;
  21.     correct(c);
  22.     _getch();
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment