Tuesday, March 29, 2011

Have an error in my c++ program....Please?

In the signature of setData, if you want to pass in strings, then you need to use either "char *xxx" or use the STL string class (std::string). Also, as you've declared each of the items in the structure as arrays of char you can't use the = operator to copy in to it, you need to use strcpy(). If you were using std::string this may make it easier.

No comments:

Post a Comment