Advertisement
Guest User

Untitled

a guest
Apr 25th, 2018
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. void funkcjaref(double &refy){
  4.     refy = refy + 100;
  5. }
  6. void funkcja(double y){
  7.     y = y + 100;
  8. }
  9. void funkcjapointer(double *py){
  10.     *py = *py + 100;
  11. }
  12. int main(){
  13. double y = 1.5, *py = &y, &refy = *py;
  14. funkcjaref(refy);
  15. cout << y << endl;
  16. cout << *py << endl;
  17. cout << refy << endl;
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement