Error on assigning new char value from struct

Well I tried to assign a new char value from a struct to another char variable but I got the "Cannot convert 'int' to 'char'" error when compiling. I've tried several alternations but I still can't get away with this error.

Here's a section of the code:

javascript:tx('code')
for(int i = 0 ; i < 10 ; i++){
pts[i].dist = sqrt((pts[i].x*pts[i].x)+(pts[i].y*pts[i].y));
}
clrscr();
float far = pts[0].dist;
char farname[20] = pts[0].name[20];
for(int i = 0 ; i < 10 ; i++){
if(pts[i].dist > far){
far = pts[i].dist;
strcpy(farname, pts[i].name);

}
}
Please use [code][/code] tags. Also, please indicate where the error occurs and what the type of pts is.
Topic archived. No new replies allowed.