This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I welcome any visitors, I’m a staple in the home | |
My day starts in the evening and as an after-work throne | |
When most of time used in a horizontal state, so | |
You can always count on me when feeling like a po-ta-to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Though I am with you all night long you leave me in the morning | |
It doesn’t give me much surprise, a tune plays as a warning | |
You use two of me, arranged during well-defined routines | |
Nearest when you’re resting and closest in your dreams |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I come with you to many places on trips and during travel | |
In civilised territory: I don’t like soil, I don’t like gravel | |
Thanks to physics, power and transmission | |
I help you undertake an expedition sans emission |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You fill me up with water, but never take a sip | |
I am a great companion when the climate starts to dip | |
I’m useless when I’m empty and unsafe when too hot | |
And as time slowly passes by my energy is lost |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I’m much longer than I am wide, so flat when I’m awake | |
But curled up tight and on my side when I can take a break | |
I help you reach your very goals, support you from the ground | |
It’s funny how each time you work I’m always lying down! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(1) int main(void) { /* ... */ } | |
(2) int main(int argc, char *argv[]) { /* ... */ } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <algorithm> | |
#include <iostream> | |
int main(int argc, char *argv[]) { | |
std::copy(argv, argv + argc, std::ostream_iterator<char *>(std::cout, "\n")); | |
// ... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(3) int main(int argc, char *argv[], char *envp[]) { /* ... */ } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (argc < 2) { | |
std::cerr << "dog: missing input file!\n"; | |
std::cerr << "usage: dog <input_file> ...\n"; | |
return EXIT_FAILURE; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (auto i = 1; i < argc; ++i) { | |
std::ifstream input_file(argv[i], std::ios::in); | |
if (!input_file.is_open()) { | |
std::cerr << "dog: could not open input file '" << argv[i] << "'!\n"; | |
return EXIT_FAILURE; | |
} | |
// ... | |
} |
OlderNewer