Click here to Skip to main content
15,892,768 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSpeeding up the registry Pin
Waldermort9-Aug-06 7:49
Waldermort9-Aug-06 7:49 
AnswerRe: Speeding up the registry Pin
Ravi Bhavnani9-Aug-06 7:57
professionalRavi Bhavnani9-Aug-06 7:57 
GeneralRe: Speeding up the registry Pin
Waldermort9-Aug-06 8:13
Waldermort9-Aug-06 8:13 
GeneralRe: Speeding up the registry Pin
Ravi Bhavnani9-Aug-06 11:20
professionalRavi Bhavnani9-Aug-06 11:20 
AnswerRe: Speeding up the registry Pin
Joe Woodbury9-Aug-06 14:11
professionalJoe Woodbury9-Aug-06 14:11 
QuestionMDI Initial Window Pin
DanYELL9-Aug-06 6:49
DanYELL9-Aug-06 6:49 
AnswerRe: MDI Initial Window [modified] Pin
bob169729-Aug-06 7:25
bob169729-Aug-06 7:25 
Questionclass template methods Pin
jon-809-Aug-06 6:12
professionaljon-809-Aug-06 6:12 
I am inheriting from a template class in order to store strings within a list type of structure, CGenericList.

I would like to call an instance of this class so that I can use its methods within the implementation of the base class.

CSentenceList.h
class CSentenceList : CGenericList<char*>
{
public:
....
CGenericList<char*> Sentences(); //linked list of sentences
};

CSentenceList.cpp
CSentenceList::CSentenceList(char strFileToRead[MAX_SENTENCE_LENGTH + 1], bool bSorted)
: CGenericList<char*> ()
{//initialize}

...

void CSentenceList::readFile(char strFileToRead[MAX_FILENAME_LENGTH])
{
char strLine[MAX_SENTENCE_LENGTH + 1];

fstream fileToRead(strFileToRead,ios::in);

while (!fileToRead.eof() && Size < MAX_LINES)
// Read line of text from file and update Sentences.strSentence.
{ fileToRead.getline(strLine, MAX_SENTENCE_LENGTH);
Sentences.Insert(&strLine);

// Error 2228: SentenceList.cpp(34): error C2228: left of '.Insert' must have class/struct/union type

Size++;
}
fileToRead.close();

}

How can I use methods of Sentences? Is it possible to implement it in another way?

Jon
AnswerRe: class template methods Pin
valikac9-Aug-06 7:34
valikac9-Aug-06 7:34 
QuestionRe: class template methods Pin
jon-809-Aug-06 18:58
professionaljon-809-Aug-06 18:58 
AnswerRe: class template methods Pin
Zac Howland9-Aug-06 10:24
Zac Howland9-Aug-06 10:24 
QuestionRe: class template methods Pin
jon-8010-Aug-06 7:19
professionaljon-8010-Aug-06 7:19 
AnswerRe: class template methods [modified] Pin
Zac Howland10-Aug-06 7:38
Zac Howland10-Aug-06 7:38 
QuestionRe: class template methods Pin
jon-8010-Aug-06 7:21
professionaljon-8010-Aug-06 7:21 
AnswerRe: class template methods Pin
Zac Howland10-Aug-06 7:41
Zac Howland10-Aug-06 7:41 
GeneralRe: class template methods Pin
jon-8010-Aug-06 9:18
professionaljon-8010-Aug-06 9:18 
QuestionNeed help with NewWindow3 and IWebBrowse2 Pin
Paul Groetzner9-Aug-06 5:13
Paul Groetzner9-Aug-06 5:13 
QuestionRe: Need help with NewWindow3 and IWebBrowse2 Pin
David Crow9-Aug-06 5:58
David Crow9-Aug-06 5:58 
AnswerRe: Need help with NewWindow3 and IWebBrowse2 Pin
Paul Groetzner9-Aug-06 6:04
Paul Groetzner9-Aug-06 6:04 
GeneralRe: Need help with NewWindow3 and IWebBrowse2 Pin
David Crow9-Aug-06 6:51
David Crow9-Aug-06 6:51 
GeneralRe: Need help with NewWindow3 and IWebBrowse2 Pin
Paul Groetzner9-Aug-06 7:03
Paul Groetzner9-Aug-06 7:03 
GeneralRe: Need help with NewWindow3 and IWebBrowse2 Pin
David Crow9-Aug-06 7:11
David Crow9-Aug-06 7:11 
GeneralRe: Need help with NewWindow3 and IWebBrowse2 Pin
Paul Groetzner9-Aug-06 7:26
Paul Groetzner9-Aug-06 7:26 
GeneralRe: Need help with NewWindow3 and IWebBrowse2 Pin
Paul Groetzner9-Aug-06 7:32
Paul Groetzner9-Aug-06 7:32 
GeneralRe: Need help with NewWindow3 and IWebBrowse2 Pin
David Crow9-Aug-06 8:20
David Crow9-Aug-06 8:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.