Website Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commite70ba1da4efe76e4b46ea9e11f910374d94b3d76 (patch)
Author
 Angel Dimitriev <angel_dimitriev@abv.bg>
2022-02-22 19:16:09 +0200
Committer
 GitHub <noreply@github.com>
2022-02-22 19:16:09 +0200
Filesc6548c2450011c5eacc7fbb08d5be9d41f5a4a3b
Object-oriented_programming_FMI-e70ba1da4efe76e4b46ea9e11f910374d94b3d76.tar
Object-oriented_programming_FMI-e70ba1da4efe76e4b46ea9e11f910374d94b3d76.tar.gz
Object-oriented_programming_FMI-e70ba1da4efe76e4b46ea9e11f910374d94b3d76.zip
Parent58a70d78f76a84626b6cd03ffcbfd1a94c229e30 (diff)
Update README.md
1 files changed, 12 insertions, 2 deletions
-rw-r--r--Sem. 01/README.md14
diff --git a/Sem. 01/README.md b/Sem. 01/README.md
index b798da7..c97a01f 100644
--- a/Sem. 01/README.md
+++ b/Sem. 01/README.md
@@ -32,7 +32,7 @@ int main()
```c++
#include <iostream>
-void f(int a)
+void f(int& a)
{
a++;
}
@@ -46,7 +46,17 @@ int main()
##### Подаване по референция.
```c++
-
+ #include <iostream>
+void f(int* a)
+{
+ (*a)++; //a++ will increment the pointer
+}
+int main()
+{
+ int a = 10;
+ f(a);
+ std::cout << a << std::endl; //11
+}
```
##### Подаване по указател.