Følgende besked kommer når jeg bruger
#include <iostream>
#include <windows.h>
#include "stdafx.h"
int main()
{
WIN32_FIND_DATA data;
HANDLE h = FindFirstFile("*.cpp",&data);
if(h!=INVALID_HANDLE_VALUE)
{
do
{
std::cout << data.cFileName << " " << data.nFileSizeHigh << " " << data.nFileSizeLow << std::endl;
}
while(FindNextFile(h,&data));
}
FindClose(h);
return 0;
}
:
------ Build started: Project: help - show content, Configuration: Debug Win32 ------
Compiling...
help - show content.cpp
c:\documents and settings\administrator\my documents\visual studio 2005\projects\help - show content\help - show content\help - show content.cpp(7) : error C2065: 'WIN32_FIND_DATA' : undeclared identifier
c:\documents and settings\administrator\my documents\visual studio 2005\projects\help - show content\help - show content\help - show content.cpp(7) : error C2146: syntax error : missing ';' before identifier 'data'
c:\documents and settings\administrator\my documents\visual studio 2005\projects\help - show content\help - show content\help - show content.cpp(7) : error C2065: 'data' : undeclared identifier
c:\documents and settings\administrator\my documents\visual studio 2005\projects\help - show content\help - show content\help - show content.cpp(8) : error C2065: 'HANDLE' : undeclared identifier
c:\documents and settings\administrator\my documents\visual studio 2005\projects\help - show content\help - show content\help - show content.cpp(8) : error C2146: syntax error : missing ';' before identifier 'h'
c:\documents and settings\administrator\my documents\visual studio 2005\projects\help - show content\help - show content\help - show content.cpp(8) : error C2065: 'h' : undeclared identifier
c:\documents and settings\administrator\my documents\visual studio 2005\projects\help - show content\help - show content\help - show content.cpp(8) : error C3861: 'FindFirstFile': identifier not found
c:\documents and settings\administrator\my documents\visual studio 2005\projects\help - show content\help - show content\help - show content.cpp(9) : error C2065: 'INVALID_HANDLE_VALUE' : undeclared identifier
c:\documents and settings\administrator\my documents\visual studio 2005\projects\help - show content\help - show content\help - show content.cpp(13) : error C2653: 'std' : is not a class or namespace name
c:\documents and settings\administrator\my documents\visual studio 2005\projects\help - show content\help - show content\help - show content.cpp(13) : error C2065: 'cout' : undeclared identifier
c:\documents and settings\administrator\my documents\visual studio 2005\projects\help - show content\help - show content\help - show content.cpp(13) : error C2228: left of '.cFileName' must have class/struct/union
type is ''unknown-type''
c:\documents and settings\administrator\my documents\visual studio 2005\projects\help - show content\help - show content\help - show content.cpp(13) : error C2228: left of '.nFileSizeHigh' must have class/struct/union
type is ''unknown-type''
c:\documents and settings\administrator\my documents\visual studio 2005\projects\help - show content\help - show content\help - show content.cpp(13) : error C2228: left of '.nFileSizeLow' must have class/struct/union
type is ''unknown-type''
c:\documents and settings\administrator\my documents\visual studio 2005\projects\help - show content\help - show content\help - show content.cpp(13) : error C2653: 'std' : is not a class or namespace name
c:\documents and settings\administrator\my documents\visual studio 2005\projects\help - show content\help - show content\help - show content.cpp(13) : error C2065: 'endl' : undeclared identifier
c:\documents and settings\administrator\my documents\visual studio 2005\projects\help - show content\help - show content\help - show content.cpp(15) : error C3861: 'FindNextFile': identifier not found
c:\documents and settings\administrator\my documents\visual studio 2005\projects\help - show content\help - show content\help - show content.cpp(17) : error C3861: 'FindClose': identifier not found
Build log was saved at "
file://c:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\help - show content\help - show content\Debug\BuildLog.htm"
help - show content - 17 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========