Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- void funkcjaref(double &refy){
- refy = refy + 100;
- }
- void funkcja(double y){
- y = y + 100;
- }
- void funkcjapointer(double *py){
- *py = *py + 100;
- }
- int main(){
- double y = 1.5, *py = &y, &refy = *py;
- funkcjaref(refy);
- cout << y << endl;
- cout << *py << endl;
- cout << refy << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement