Bits and Pieces

Thursday, February 27, 2014

to trim buff after reading line by line with fgets (c++)

buff[ strcspn( buff, "\n")]='\0';

solves the new line at the end of the string (kind of trim() )
Posted by efcan at 7:57 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

efcan
View my complete profile

Blog Archive

  • ▼  2014 (24)
    • ►  October (1)
    • ►  September (2)
    • ►  June (3)
    • ►  April (2)
    • ►  March (6)
    • ▼  February (10)
      • listing the files in a directory c++ linux
      • how to compile opencv on linux (ubuntu)
      • how to install opencv on linux
      • descriptor matcher
      • to check if an element in map
      • to insert unordered_map
      • to trim buff after reading line by line with fgets...
      • to compile unordered_map with gcc under linux
      • opencv flann index of a data file with svm-light l...
      • 1st post
Awesome Inc. theme. Powered by Blogger.