Skip to content

Instantly share code, notes, and snippets.

@clauswitt
Created November 30, 2015 19:09
Show Gist options
  • Save clauswitt/9a1c954a544704bae937 to your computer and use it in GitHub Desktop.
Save clauswitt/9a1c954a544704bae937 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <string>
int main(int argc, char** argv)
{
std::string line;
int counter = 0;
while (std::getline(std::cin, line)) {
counter++;
std::cout << counter << ": " << line << "\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment