Hi.. can anyone tell me what is the meaning of this error??
[Error] cannot convert 'std::string {aka std::basic_string<char>}' to 'char' for argument '1' to 'char strcpy(char*, const char*)'
When I'm taking TeamName as char TeamName[30]; , the compiler shows linker error.
what could be the problem?
I use DEV C++ 5.2.0.3
#include<iostream>
#include<iomanip>
#include<cstdlib>
#include<fstream>
#include<string>
#include<cstring>
using namespace std;
class team
{
team *base;
string TeamName;
public:
team()
{
base = NULL;
}
void create_team();
void front();
};
void team::create_team()
{
string x;
team *temp = new team;
cout<<"ENTER THE TEAM NAME: ";
cin>>x;
strcpy(temp->TeamName,x); //FACING ERROR HERE!!
}