SHARE
TWEET

Untitled

a guest Dec 12th, 2018 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. ostream &func(ostream &r)
  6. {
  7.     r << "\n ************************* \n";
  8.     return r;
  9. }
  10.  
  11. int main() {
  12.  
  13.     int x = 999;
  14.  
  15.     // cout ve x referans yoluylu func fonksiyonuna gonderiliyor
  16.     func(cout) << x << endl;
  17.     //  *************************
  18.     // 999
  19.  
  20.     // func fonk'nun geri donus degeri referanssa aldigi nesneyi geri vericektir
  21.     // bu referansa geri donmekle yapilan bir hile
  22.  
  23.     return 0;
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top