Witam
Mam pytanie co muszę zrobić aby kod poniżej działał
W copyfile wyskakuje błąd
Czy będe musiał użyć char zamiast string?
Pozdro
Mam pytanie co muszę zrobić aby kod poniżej działał
Kod:
#include <iostream>
#include <windows.h>
#include <cstring>
using namespace std;
int main(int argc, char **argv)
{
string a,b,c;
a = "C:";
b = "tereferetest.exe";
c = a+b;
[u]CopyFileA(argv[0],c,0);[/u]
return 0;
}
W copyfile wyskakuje błąd
Kod:
C:Dev-Cpptest.cpp cannot convert `std::string' to `const CHAR*' for argument `2' to `BOOL CopyFileA(const CHAR*, const CHAR*, BOOL)'
Czy będe musiał użyć char zamiast string?
Pozdro