Skip to content

Instantly share code, notes, and snippets.

@mkoppanen
Created July 24, 2010 22:34
Show Gist options
  • Save mkoppanen/489045 to your computer and use it in GitHub Desktop.
Save mkoppanen/489045 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <string>
int main(int argc, char *argv[])
{
if (argc < 2) {
std::cerr << "Usage: " << argv[0] << " <word>" << std::endl;
return EXIT_FAILURE;
}
string test = argv[1];
std::cout << "Length: " << test.size() << " Value: " << test << std::endl;
return EXIT_SUCCESS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment