Hi!
So, I need to list all the files in the current directory, i have tried several methods but i keep getting this error: cannot convert `std::basic_string<char, std::char_traits<char>, std::allocator<char> >' to `const char*' for argument `1' to `int system(const char*)'
What is the best method to do this?

In any case, heres what i have so far...

#include <stdlib.h>
#include <string>
using namespace std;

int main(int argc, char *argv[])
{
system("DIR "+ExePath());
system("PAUSE");
return 0;
}

string ExePath() {
char buffer[MAX_PATH];
GetModuleFileName( NULL, buffer, MAX_PATH );
string::size_type pos = string( buffer ).find_last_of( "\\/" );
return string( buffer ).substr( 0, pos);
}

Thanks in Advance!
-0M3G4