I used the strcpy() function and it only works if I use C-string arrays like:
char a[6] = "text";
char b[6] = "image";
strcpy(a,b);
but whenever I use
string a = "text";
string b = "image";
strcpy(a,b);
I get this error:
functions.cpp: no matching function for call to
strcpy(std::string&, std::string&)
How to copy 2 strings of string data type in C++?
a=b;:D ____std::stringtype and not usestrcpybut copy assignment.