View Single Post
Join Date: Apr 2008
Posts: 47
Reputation: Cybulski is an unknown quantity at this point 
Solved Threads: 3
Cybulski's Avatar
Cybulski Cybulski is offline Offline
C++ wannabe

Re: Iterator assertion failure. How?

 
0
  #8
May 16th, 2008
yes, it compiles and works ok, but this:
  1. if( (s_current.compare(struct_filedata.name) && s_parrent.compare(struct_filedata.name)) )
  2. {
  3. s_filename = p_sPath + "\\" + struct_filedata.name;
  4. cout << "Subdir found: " << s_filename << endl;
  5. MakeList(s_filename);
  6. }
  7. else
  8. {
  9. cout << "Dir found: " << struct_filedata.name << endl;
  10. }

Should display:
  1. Dir found: .
  2. Dir found: ..
for every directory. It only does it for "..". Why is that?

And I had to declare additional strings and use string.compare(...) because strcmp() takes no struct_filedata.name as parameter.
Reply With Quote