dirent.h in Visual Studio 2010 or 2008
Because this header file doesn't come with MSVC. Hence it cannot find it!
It comes with C POSIX library. The wikipedia says,
dirent.h is known to be included in
the following compilers:
- Turbo C++ (DOS)
- GCC (Cross-platform)
- MinGW (Microsoft Windows)
- Borland C++ Builder (Microsoft Windows)
Microsoft Visual C++ does not include
dirent.h
However, you can download free Windows implementation of dirent.h which you can use with Microsoft Visual Studio.
WINAPI C++ VS 2008 vs VS 2010
Most probably, the problem here is that your VS 2008 project was Multibyte CharacterSet based and VS 2010 project is UNICODE based.
Right-click on Project->Properties->General->Character Set
Change it to 'Use Multi-Byte Character Set'.
Alternatively, if you want to keep your code UNICODE
based, then add _T
before all the strings that you are defining.
Related Topics
How to Correctly Use Cv::Triangulatepoints()
Questions About Hinnant's Stack Allocator
Sizeof Class with Int , Function, Virtual Function in C++
Is !! a Safe Way to Convert to Bool in C++
Why Does C++11 Have 'Make_Shared' But Not 'Make_Unique'
How to Print Utf-8 Strings to Std::Cout on Windows
Which C++ Signals/Slots Library Should I Choose
Do Child Threads Exit When the Parent Thread Terminates
Convert Float to Std::String in C++
Arduino Sprintf Float Not Formatting
Correct Usage(S) of Const_Cast<>
How Is Static Variable Initialization Implemented by the Compiler
C++ Automatic Factory Registration of Derived Types
Xcode with Boost:Linker(Id) Warning About Visibility Settings
Do I Need to Protect Read Access to an Stl Container in a Multithreading Environment