TS
Size: a a a
TS
_
_
_
BotBase, а затем вызвал функцию Auth, где первым делом же проверяется connectedToLongPoll_АВ
_
АВ
class ClientBase {
public:
ClientBase()
: connectedToLongPoll_(false) {
int _break = 0;
}
protected:
bool connectedToLongPoll_;
};
class BotBase : public ClientBase {
public:
BotBase() {
int _break = 0;
}
void Send(std::string message) {
if (connectedToLongPoll_) throw std::exception();
}
};
int main()
{
BotBase bb;
bb.Send("123");
}
все корректно, connectedToLongPoll_ - trueАВ
int _break = 0; - тупо для бряков поставил ))АВ
АВ
АВ
TS
src/BotBase.cpp & src/ClientBase.cpp АВ
АВ
BotBaseTS
BotBase::BotBase(const std::string groupId, const std::string timeWait)
: ClientBase()
, groupId_(groupId)
, accessToken_("")
, timeWait_(timeWait)
{
}_
BotBase::BotBase(const std::string groupId, const std::string timeWait)
: ClientBase()
, groupId_(groupId)
, accessToken_("")
, timeWait_(timeWait)
{
}ClientBase()_
ClientBase::ClientBase()
: connectedToLongPoll_(false)
{
}_