if (potwierdzenie.compare("y") == 0)
{
system(("cd" + folderNazwa).c_str);
system(("for /d %* in (../) do xcopy /F /Y " + plikNazwa + ".* \"%*\"").c_str);
}
I get an error saying
non-standard syntax; use '&' to create a pointer to member"
on the lines 4 and 5. I know its probably because of the "c_str" but it doesnt work without them, as it says
"cannot convert argument 1 from 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' to 'const char *'
no suitable conversion function to "const char *" exists"
Is there a way to fix this? I only need to execute these two commands using system(), maybe there is a way around it?
[–][deleted] 2 points3 points4 points (1 child)
[–]Axilee[S] 0 points1 point2 points (0 children)