I'm trying to create a structure that holds a number of word sets. 
Each word set consists of the number of the set, a list of words in 
the set, and the time a participant spends on the set:

struct wordsForSet {
    int setNum;
    string words[50];
    float timeSpent;
};

struct wordsForSet wordSets[6] = {
    {0, "", 0.0},
    {1, "", 0.0},
    {2, "", 0.0},
    {3, "", 0.0},
    {4, "", 0.0},
    {5, "", 0.0}
};

This code compiled in Dev-C++, but I'm now moving to Visual C++ and 
it's found errors with the code:

"error C2440: 'initializing' : cannot convert from 'double' 
to 'std::string' 1> No constructor could take the source type, or 
constructor overload resolution was ambiguous"

I guess it's something to do with initialising the string arrays, but 
I don't know how to fix it.

Any suggestions would be much appreciated.

Thanks,

Robin.

Reply via email to