Hey I'm pretty new to C++ but have quite a bit of experience in Java. I have a project to make a Morse code translator. I have a struct that holds a letter and its morse code equivalent. Then I have a vector of these structs to hold all of the combinations. Here's the code thats giving me problems.
cerr << "Cannot open: " << myConversionTableFile << "." << endl;
for(int i = 0; i < myConvertorTable->size(); i++)
cout << "morse: " << myConvertorTable->morse->at(i) << endl;
cout << "letter: " << myConvertorTable->letter->at(i) << endl;
Heres the error messages.
MorseCodeTranslator.cpp: In member function ‚void MorseCodeTranslator::setupConvertorTable()‚:
MorseCodeTranslator.cpp:19: error: ‚class std::vector<MorseCodeTranslator::Code, std::allocator<MorseCodeTranslator::Code> >‚ has no member named ‚letter‚
MorseCodeTranslator.cpp:22: error: ‚class std::vector<MorseCodeTranslator::Code, std::allocator<MorseCodeTranslator::Code> >‚ has no member named ‚morse‚