Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
LithiumOx committed Apr 18, 2024
1 parent 34c66c7 commit d028c03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions 01/ex01/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ int main() {
std::cout << "malloc failed!" << std::endl;
return 1;
}
for (int i = 0; i < 10; i++) {
horde[i].announce();
}
for (int i = 0; i < 10; i++) horde[i].announce();
delete[] horde;
return 0;
}
4 changes: 3 additions & 1 deletion 01/ex02/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ int main() {
std::string *ptr = &s;
std::string &ref = s;

/* This will print the adresses */
std::cout << &s << "\n";
std::cout << &ptr << "\n";
std::cout << ptr << "\n";
std::cout << &ref << "\n";

/* Here you'll see that they all print the string */
std::cout << s << "\n";
std::cout << *ptr << "\n";
std::cout << ref << "\n";
Expand Down

0 comments on commit d028c03

Please sign in to comment.