Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. char delimiter = ',';
  2.  
  3. boost::program_options::options_description desc("Options");
  4. desc.add_options()
  5. ("delimiter,d",
  6. boost::program_options::value<char>(&delimiter)->default_value(','),
  7. "specify printable ASCII delimiter (comma/CSV by default)");
  8.  
  9. if (delimiter != ',' && !isprint(delimiter) && delimiter != 't') {
  10. std::cerr << "Delimiter must be printable ASCII character.n";
  11. return EXIT_FAILURE;
  12. }
  13.  
  14. ERROR: the argument ('t') for option '--delimiter' is invalid
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement