Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 01 / README.md
diff options
context:
space:
mode:
Commit87511b7e7bec079a1c48be483decbeee8a1f195a (patch)
Author
 Angel Dimitriev <angel_dimitriev@abv.bg>
2022-02-23 02:23:26 +0200
Committer
 GitHub <noreply@github.com>
2022-02-23 02:23:26 +0200
Files944f265ebe38525a13f2af9a1166ea3bdcb387ad /Sem. 01/README.md
Object-oriented_programming_FMI-87511b7e7bec079a1c48be483decbeee8a1f195a.tar
Object-oriented_programming_FMI-87511b7e7bec079a1c48be483decbeee8a1f195a.tar.gz
Object-oriented_programming_FMI-87511b7e7bec079a1c48be483decbeee8a1f195a.zip
Parente82535dfce27bc2ff690554cea51cfa71cdfd082 (diff)
Update README.md
1 files changed, 10 insertions, 10 deletions
-rw-r--r--Sem. 01/README.md20
diff --git a/Sem. 01/README.md b/Sem. 01/README.md
index db4774d..a76fc72 100644
--- a/Sem. 01/README.md
+++ b/Sem. 01/README.md
@@ -7,22 +7,22 @@
```c++
int main()
{
-int a = 10; // int in the stack
-int* ptr = new int(30); // int in the dyniamic memory (we use a pointer on the stack to point to the int)
+ int a = 10; // int in the stack
+ int* ptr = new int(30); // int in the dyniamic memory (we use a pointer on the stack to point to the int)
-std::cout << "First number: " << a << " " << " second number: " << (*ptr) << std::endl;
+ std::cout << "First number: " << a << " " << " second number: " << (*ptr) << std::endl;
-std::cout << "Address of second number" << ptr << std::endl;
+ std::cout << "Address of second number" << ptr << std::endl;
-delete ptr; //!!!
+ delete ptr; //!!!
-ptr = &a;
-std::cout << "Address of first number" << ptr << std::endl;
+ ptr = &a;
+ std::cout << "Address of first number" << ptr << std::endl;
-int& b = a; //another name for the variable
-b = 30;
+ int& b = a; //another name for the variable
+ b = 30;
-std::cout << "First number" << a << std::endl
+ std::cout << "First number" << a << std::endl
}
```