fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. using std::cout;
  6. using std::endl;
  7. int *ptr = new int, *ZerowanyPtr = new int();
  8. auto Wyswietl = [](int *ptr)->void
  9. {
  10. cout << "Adres: " << ptr << endl;
  11. cout << "Wartosc: " << *ptr << endl;
  12. };
  13.  
  14. Wyswietl(ptr);
  15. Wyswietl(ZerowanyPtr);
  16. return 0;
  17. }
Success #stdin #stdout 0s 3028KB
stdin
Standard input is empty
stdout
Adres: 0x90fc008
Wartosc: 0
Adres: 0x90fc018
Wartosc: 0