#include <iostream>
#include <string>
#include <stdlib.h>
#include <sstream>
usingnamespace std;
string n;
stringstream ss;
int main()
{
cout<<"Detecting all files name"<<endl;
//the detecting funtion
cout<<"C:\Users\cosmi\Desktop\Music\Spag Heddy-Permanent.mp3"<<endl; //This is an example for name
cout<<".....<<"endl;
cout<<"Witch you want to run?<<endl;
cin >> n;
ss << "start " << n;
system (ss.str().c_str());
//the end
return 0;
}
soo, theres any funtions to read the name files?
Thanks in advance
||=== Build: Debug in Detect Name Files (compiler: GNU GCC Compiler) ===|
F:\Projects\C++\Code Blocks\Mine\Detect Name Files\main.cpp|5|error: '::main' must return'int'|
F:\Projects\C++\Code Blocks\Mine\Detect Name Files\main.cpp||In function 'int main(int, TCHAR**)':|
F:\Projects\C++\Code Blocks\Mine\Detect Name Files\main.cpp|13|error: return-statement with no value, in function returning 'int' [-fpermissive]|
F:\Projects\C++\Code Blocks\Mine\Detect Name Files\main.cpp|20|warning: format '%d' expects argument of type 'int', but argument 2 has type 'DWORD {aka long unsigned int}' [-Wformat=]|
F:\Projects\C++\Code Blocks\Mine\Detect Name Files\main.cpp|21|error: return-statement with no value, in function returning 'int' [-fpermissive]|
||=== Build failed: 3 error(s), 1 warning(s) (0 minute(s), 8 second(s)) ===|
||=== Build: Debug in Detect Name Files (compiler: GNU GCC Compiler) ===|
F:\Projects\C++\Code Blocks\Mine\Detect Name Files\main.cpp||In function 'int main()':|
F:\Projects\C++\Code Blocks\Mine\Detect Name Files\main.cpp|19|warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'DWORD {aka long unsigned int}' [-Wformat=]|
||Error: %u ", GetLastError ());|
||=== Build finished: 1 error(s), 1 warning(s) (0 minute(s), 1 second(s)) ===|