Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
throwaway968321
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
throwaway968321
4y ago
in https://github.com/terroo/flappybird/blob/main/flappy.cpp#L1... for (std::size_t i {}; i < pipes.size(); ++i) { C++ has had range based loops for years now, can use that instead here. fo
2.
▲
by
throwaway968321
4y ago
just want to point out, this unjustly uses std::shared_ptr in main.cpp auto flappy = std::make_shared<FlappyBird>(); flappy->run(); you can do this. FlappyBird flappy; flappy.run(); in flappy.hpp std::shared_