"Class type redefinition" error between header and source files (Different
Case)
I have seen this question: "Class type redefinition" error between header
and source files
If you'll just say a duplicate of the above question, please check first
the code below.
The problem is that the "Class type redefinition" should not happened
because I think I have done it properly.
Here is the code.
TTSpeech.h
#include <wtypes.h>
#include <string>
#include <vector>
class TTSpeech
{
public:
enum State
{
State_Loaded,
State_Unloaded,
};
TTSpeech();
virtual ~TTSpeech();
virtual bool isAvailable() = 0;
virtual bool load() = 0;
virtual bool unload() = 0;
virtual bool isLoaded() const = 0;
virtual bool say(const std::string &sentence) = 0;
virtual bool setVolume(int volume) = 0;
virtual bool setPitch(int pitch) = 0;
virtual bool setRate(int rate) = 0;
virtual bool setVoice(const std::string &voice) = 0;
virtual std::vector<std::string> getVoices() const = 0;
};
TTSpeech.cpp
#include "TTSpeech.h"
TTSpeech::TTSpeech()
{
//code
}
TTSpeech::~TTSpeech()
{
//code
}
The only unusual thing that I have done is to remove the files from the
solution, relocate the above file to a folder because of this issue:
cannot open include no such file or directory. Then re-add the files to
the solution. I'm using Visual Studio 2012 running of Windows 8
No comments:
Post a Comment