Answer to Question #175001 in C++ for Jean Claude

Question #175001

b) Write a C/C++ system program to search for a file in the Windows file system and display the file information on the screen. Compile and run the program and copy the source code into your answer booklet. 


1
Expert's answer
2021-03-25T16:59:19-0400
#include<Windows>
#include<iostream>
using namespace std;

int main(){
    //file variable
WIN64_FIND_DATA FindFileData;
HANDLE hFindFIle;

//
LPCWSTR file=L "*.cpp";
//find file function
hFindFIle=FindFirstFile(file,&FindFileData);
if(INVALID_HANDLE_VALUE==hFindFIle){
    
    cout<<"error in finding file"<<endl;
    cout<<"Error -"<<GegLastError()<<endl;
}else{
    cout<<"error in finding file"<<endl;'
    wcout<<
}


return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS