Who's good at C++?

Stiganator

Platinum Member
Oct 14, 2001
2,492
3
81
Ok so here is the deal. I want a piece of code that will search for a set of inputable file names in a set of possible locations and display certain attributes, such as file size(in bytes), name, and date time. Its been a number of years since I have worked with C++ and I don't have enough knowledge with the DirectoryInfo and FileInfo classes. This is to verify that certain files are exact copies between the two systems. Let the coding begin!

#include <iostream.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <stats.h>
#include <stdlib.h>
//using namespace std;
//=================================================
std::string FileArray[]={"Keyboard.ocx","SmallKeyboard.ocx"};
std::string DirectoryLocations[]={"C:\\WINNT\\SYSTEM32"};
std::string Attributes[2][1];
std::string Selection;

int main()
{



//Start:
cout<<"Welcome to Searchinator.This tool is designed to simplify verification of files."<<endl;
cout<<"1: Standard Search"<<endl;
cout<<"2: Add New Files"<<endl;
cout<<"3: Add or change directory"<<endl;
cout<<"Please Enter Your Selection and Press enter: ";
getline(cin,Selection);

Decider:
switch(Selection)
{
case '1':
{
}

case '2':
{
}

case '3':
{
}
case 'q':
{
goto End;
}
case 'Q':
{
goto End;
}
default:
{
cout<<endl<<"Invalid Entry"<<endl<<endl;
cout<<"1: Standard Search"<<endl;
cout<<"2: Add more Files"<<endl;
cout<<"3: Add or change directory"<<endl;
cout<<"Please Enter Your Selection and Press enter: ";
getline(cin,Selection);
goto Decider;
}

}
End:
return(0);
}

this partial code get screwed up, it doesn't like get line for some reason
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
or if you really need to implement it, i would recommend perl.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Why not just use something like rsync that will use hashing to verify the files are the same?