The program asks the user to enter his or her first name and then last name, and
that then constructs, stores, and displays a third string consisting of the user’s last name, followed by a comma, a space, and first name. I'm using string objects and methods from the string header file.
But it issues the following error during the compilation:
1>------ Build started: Project: ex4ch4, Configuration: Debug Win32 ------
1>Compiling...
1>source.cpp
1>c:\documents and settings\user\my documents\visual studio 2008\projects\bacon\bacon\source.cpp(14) : error C2664: 'strcpy' : cannot convert parameter 1 from 'std::string *' to 'char *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\documents and settings\user\my documents\visual studio 2008\projects\bacon\bacon\source.cpp(15) : error C2664: 'strcat' : cannot convert parameter 1 from 'std::string *' to 'char *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\documents and settings\user\my documents\visual studio 2008\projects\bacon\bacon\source.cpp(16) : error C2664: 'strcat' : cannot convert parameter 1 from 'std::string *' to 'char *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>Build log was saved at "file://c:\Documents and Settings\User\My Documents\Visual Studio 2008\Projects\bacon\bacon\Debug\BuildLog.htm"
1>bacon - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========