2010-05-20, 09:55 PM
butterfλi Wrote:I'm getting confused between Eos' vs the standard way of doing it.
In simplest words:
class declarations goes in .h
class methods goes in .cpp
So from the original code,
what goes in .h :
Code:#ifndef STORYWORDMANAGER_H
#define STORYWORDMANAGER_H
class StoryWordManager {
};
#endif
What goes in .cpp :
Code:StoryWordManager::StoryWordManager() {
}
string StoryWordManager::askText() {
}
That's what I'm understanding.
No. The class declaration encompasses all method declarations, so your .h would be:
Code:
#ifndef STORYWORDMANAGER_H
#define STORYWORDMANAGER_H
class StoryWordManager {
StoryWordManager();
string askText();
};
#endif
