From 950f1999497a9c6d15ba837a07a664190327f244 Mon Sep 17 00:00:00 2001 From: Lucas Rufkahr Date: Fri, 27 Feb 2026 14:24:37 -0600 Subject: [PATCH] Updated cpp.php --- notes/.cpp.php.kate-swp | Bin 21917 -> 0 bytes notes/cpp.php | 26 +++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) delete mode 100644 notes/.cpp.php.kate-swp diff --git a/notes/.cpp.php.kate-swp b/notes/.cpp.php.kate-swp deleted file mode 100644 index 11b7d00ba2ab2f45a05cf8d1c80e42773c58b337..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21917 zcmdU%2eeexxquk~;aX6!_Yu3|MG?hdTYH|YvO!o@BQz;?{j9j88m3n$OC%%Tg_=p zdKNbK>7CnZj_uxd(4ax9jh#Gx^?zNt+}{SzxN)VwzIp7Lt4(@%{In^91~raM?=#bk z#)QcoJ_|mv@H^o}h0lg3PM$U+{fG7EAn2%ck=Nj^uCDe}t_)7^N;EtK&Z6O=a25?O z3un>rFhn1nKJY4{xe}r$wYP#pbhB`Xo?SRZFD^VRt!d0JJRF``xC`ztyd2zHczJk1 z;T2%XTM?E%Bj6=v{z~wi!Yjj)zX~jUM%L!93QPWK@T?+lby)hX0k_Kdns8s?wP49x z8>EvEdQ(rYyJ9g4lVK70M`B+!dl;i6`ze@tsezTpN(Pdw+Y-+?Af$7e>3>> zGQK&i{kMP>k1b)vV=GwuZw;SRO$?+DBO@$kZ;|4y*v?F>uaF0kUiE3EpOP@BISoVyC~p9m|TcZVf!4_Ns-36?&4 z!l^Y>9bqr{)WUnik~bMv{Puw*e_vSo?FWyUJgrDfI}Olye^@&l088S5urxjhmc|Fe z-9`Q(usl2!o>9gRg%$C)!ID1>Rz^;TCGRj;6?HhQj7$A{fQOENB`@{%0U1t1wtS-M zj6S9|ek`mA9S6&Q$HR)y39$Ux1IwNhVP*78SQ$MFRz|mA`D->Tc_+cj;5o4L>xI>U zPKLGq6j&8Kw>CZxmi+m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to^T-w$Eg_aj*P{kS&&C$RG8r?B$p zXR!49IV^pC0m~o1gr(1~VENdLw_|nYuGLK)Y&n?#_*owcS>&?Y3Ipt(w0&EbpvQo4+P3 zZ?6TH!>X}1ENj<+W$n7Kyt7`OUs;>Dv3{r7G-9~B@cMarrS1msj5598u>~x5ZV7AutzaeF*0A;;4a9a#^d`Eb6@&9;O`|kv6{m!ubxeF})c7@aWDjgE@ zg>!{zdSlnJTdbD$v0BjJ_?2 z(YN#OCLxh5X{Cj{@^6qc@}>CG(%J2yYRuDz^4ov>_>X|0>D|@N(h93zO<gn%k_Rs0*Z}#>zd*{!byLeV>R{D^xwVJaR z&!5@fyI_8EVb7wTd9D7|B4*88u&_7HnZ0PiyqI-r&)mhW=7QN77WMX=nEsy^i_Ey* zv*@J7^IG%!yPMPJAY)Ohr@z(L?3v$87kd}A=APc1-&)c~VcuYXusLbbg869+jOt7Jchv1z*c%R5+!w}oH)qUg)m+dzt+%hg zZ*&ro)bFU7KF@0P^)Fg*dTUlbagw+BzlH4l<^>-GkE#CQF;|Y}N=_{J7`VhU{w}8a zd)$-KSp3*MCw<_hAG^6UB)zL#frrB7{1}isj8|nrqQddxUvK)rOR~9S*>K42Si+Ua z%)A>M(z9jo@bs=M`JZ-6QwNo@sP@ZcQDJ2&9GeeNXQ|sK$I@;pb&|jenLfNA^722y z>4=vtAv{N^5?1~5aJVbItzNW~0qVJ-up%0YB*u+kZZM~$@#d5yac=s+OR?b+u^BR9 z@!W|7k_!>YdFcbM5z$^I% A function is a wrapper to easily reuse code and improve readability of your program. The function signature contains the return type, the identifier of the function, and the parameters that the function requires. The function contains statements within the curly braces. Finally, the function returns a value which has a type indicated in the function signature. Proper functions also have one intended use. If a function contains more than one use, it is a good idea to split them up.
type name (parameters) {...}
- Functions must be defined before they are called. That is, the definition must come before any reference to using the function. A function call is done by referencing the name of the function as a statement. For example my_function(1,2,3); is a call to my_function(int a, int b, int c) {...} with the parameter values a = 1, b = 2, c = 3. + Functions must be defined before they are called. That is, the definition must come before any reference to using the function. A function call is done by referencing the name of the function as a statement. For example my_function(1,2,3); is a call to my_function(int a, int b, int c) {...} with the parameter values a = 1, b = 2, c = 3.
+
+ A function which does not return anything has the type of void. When using a void type for a function, it is okay to omit the return statement at the end of the function. In other words, when using a void type, the return statement is optional.
+
+ Functions are also essential to organized code. It can also save you time because you no longer need to rewrite or copy large blocks of code that may need to be re-used. Instead, just call the function. +

+

II. Function Types

+

+ In c++, there are three different types of function parameters. +

    +
  • Pass by value
  • +
      +
    • The data that is included in the function parameter is copied from the value of the variable that is in the argument. This creates an entirely new variable with the exact same data as the variable in the parameter. This new variable has only the scope of the function it is used in. When the function exists, this variable is destroyed.
    • +
    +
  • Pass by reference
  • +
      +
    • +
    +
  • Constant parameters
  • +
      +
    • +
    +
+

Pass by value:

+

Other Topics

String Manipulation