hello guys!I would like to give a little help for a problem which stops me from my project.
take a look plz...<br>
void traverseDir( string dirname ){
string str;
DIR *pDIR;
struct dirent *entry;
pDIR=opendir(dirname.c_str());
while((entry = readdir(pDIR)) != NULL ){
if( isDir( dirname.c_str() ) ) {
if( strcmp(entry->d_name, ".") != 0
&& strcmp(entry->d_name, "..") != 0 ){
cout << entry->d_name <<endl;
string pathDir = dirname + "/" + ( entry->d_name );
traverseDir( pathDir );
cout <<"verify: " << dirname <<endl;
chdir( dirname.c_str() );
}
}
else {
cout << "This is file: " << entry->d_name <<endl;
}
} //while
closedir(pDIR);
}
compiler borland C++ 5.02.
Fault:Access Violation at 0x406be3:
read of address 0x8.
I'would be really appreciate if you could give me a hand.Thanks for the moment...