User Tools

Site Tools


en:cs:cpp:common:function

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:cs:cpp:common:function [2025/05/02 23:03] – created ulascemhen:cs:cpp:common:function [2025/05/02 23:07] (current) ulascemh
Line 27: Line 27:
 ==== Invocation by Reference ==== ==== Invocation by Reference ====
  
-If you need to refresh your knowledge about references, [[en:cs:cs:cpp:common:reference|references]] see page.+If you need to refresh your knowledge about references, [[en:cs:cpp:common:reference|references]] see page.
  
 Class types in the standard library are not suitable for calling by value. Because these types are costly to copy. Class types in the standard library are not suitable for calling by value. Because these types are costly to copy.
Line 68: Line 68:
 { {
     int x { 5 };     int x { 5 };
- 
     std::cout << "value = " << x << '\n';     std::cout << "value = " << x << '\n';
- 
     addOne(x);     addOne(x);
- 
     std::cout << "value = " << x << '\n'; // x has been changed.     std::cout << "value = " << x << '\n'; // x has been changed.
- 
     return 0;     return 0;
 } }
en/cs/cpp/common/function.1746227005.txt.gz · Last modified: 2025/05/02 23:03 by ulascemh