How i can check that current file is doc, docx, xls, xlsx or pdf format? What's a c++ library i can use for this goal in my C++ application?
If you want to understand file's type based on its contents, you can check the file's binary signature.
If you want just to check the extension, you have 2 nice options:
Use std::string functions find
, find_first_of
, find_last_of
and substr
to write your own logic that analyzes the file name.
Use boost filesystem library's function extension
.