Advertisement
apl-mhd

passByValue

Jan 25th, 2019
193
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. #include <cstdio>
  3. #include <cstring>
  4. #include <cctype>
  5. using namespace std;
  6.  
  7. struct  list{
  8.  
  9.     string name;
  10.     string type;
  11.  
  12.       list  *node;
  13.  
  14. };
  15.  
  16. void dispaly(string& name){
  17.  
  18.  
  19.     name[0]='L';
  20. }
  21.  
  22.  
  23. int main() {
  24.  
  25.    string name="Apel";
  26.  
  27.    dispaly(name);
  28.    cout<<name<<endl;
  29.  
  30.  
  31.  
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement