Link to home
Start Free TrialLog in
Avatar of gndcdosps
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;

}
ASKER CERTIFIED SOLUTION
Avatar of Infinity08
Infinity08
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gndcdosps
gndcdosps

ASKER

Thanks again.