Skip to content
Prev Previous commit
Inline newlines
  • Loading branch information
ShadowMitia committed Jan 12, 2022
commit 00ee930a5617310988d9c682e3e723fd03ca1c90
7 changes: 3 additions & 4 deletions contents/stacks_and_queues/code/cpp/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include<cassert>

namespace my {
const char endl = '\n';
/**
* implementation using linked list
* [value][next] -> [value][next] -> ... -> [value][next]
Expand Down Expand Up @@ -85,8 +84,8 @@ int main() {

int frontElement = intQueue.front();
intQueue.dequeue();
std::cout << frontElement << my::endl;
std::cout << intQueue.size() << my::endl;
std::cout << intQueue.front() << my::endl;
std::cout << frontElement << '\n';
std::cout << intQueue.size() << '\n';
std::cout << intQueue.front() << '\n';
return 0;
}
7 changes: 3 additions & 4 deletions contents/stacks_and_queues/code/cpp/stack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include<memory>

namespace my {
const char endl = '\n';
/**
* implementation using linked list
* [value][next] -> [value][next] -> ... -> [value][next]
Expand Down Expand Up @@ -78,8 +77,8 @@ int main() {

int topElement = intStack.top();
intStack.pop();
std::cout << topElement << my::endl;
std::cout << intStack.size() << my::endl;
std::cout << intStack.top() << my::endl;
std::cout << topElement << '\n';
std::cout << intStack.size() << '\n';
std::cout << intStack.top() << '\n';
return 0;
}