gndcdosps
asked on
String help
Can someone tell me why this does not work.... I am trying to copy the student's company name into "name"
struct FUN {
char description [21];
char company [21];
int month;
int day;
};
int main() {
char name [21];
int answer;
FUN student;
FUN faculty;
strcpy (student.company, "Acme Manufacturing");
//copy student's company into name
strcpy (student.company, name);
cout << name << endl;
return 0;
}
struct FUN {
char description [21];
char company [21];
int month;
int day;
};
int main() {
char name [21];
int answer;
FUN student;
FUN faculty;
strcpy (student.company, "Acme Manufacturing");
//copy student's company into name
strcpy (student.company, name);
cout << name << endl;
return 0;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER