Yura
и какие вещи
Alexander "SonnySlave"
и какие вещи
опрос пройдёт - узнаешь на сайте 😊
Andrei
чому? кубит же.
Evgenii
чому? кубит же.
ну мы хотим запутанные состояния описывать
Anonymous
кто-нибудь умеет писать ботов для ВК на си++?
Anonymous
есть какая-то библиотека cURL для этого вроде
Anonymous
Это не тот язык.
Alexander "SonnySlave"
кто-нибудь умеет писать ботов для ВК на си++?
я бы не рисковал здесь такое спрашивать
Anonymous
Не советую.
на питоне лучше?
Anonymous
Да.
Anonymous
ну да, я нуб )
Anonymous
Если только у тебя не бот-числодробилка какая-то.
Anonymous
признаюсь сразу)))
Anonymous
Или с тяжелыми вычислениями другими.
Anonymous
Но что-то в это слабо верится.
Anonymous
И то лучше Python и положить под него один модуль на C с нужной магией.
Anonymous
у меня хелловорлды QTшные))
Anonymous
азы питона знаю третьего
Anonymous
прошу прощения за небольшой оффтоп
Anonymous
Стартуй тогда.
Anonymous
больше не буду
Anonymous
ок
Anonymous
Разумеется библиотека.
Anonymous
пойду на канало питонистов
Anonymous
спрошу)
Anonymous
Держи в курсе.
Anonymous
Anonymous
Это был сарказм, если что.
Anonymous
а
Anonymous
ок)))
Anonymous
там тоже один сарказм)))
Anonymous
придется на ассемблере писать бота))))
Anonymous
Жги.
Anonymous
хорошо
Berkus
а вот кстати вопросиус: как часто вы юзаете с++11 или 17?
перевёл команду на с++17, теперь всегда когда могу
Constantine
https://godbolt.org/g/AqUPj6
Constantine
#include <type_traits> class SomeInterface { public: SomeInterface(SomeInterface&& other) = delete; SomeInterface() = default; virtual ~SomeInterface() = default; }; static_assert(!std::is_move_constructible<SomeInterface>::value); class SomeChild final : public SomeInterface { public: template <typename... TArgs> SomeChild(TArgs&&...) { } }; static_assert(!std::is_move_constructible<SomeChild>::value, "WUT?");
Constantine
и как обмазывать perfect forwarding конструктора?
Anonymous
QT - сила )
Anonymous
https://pp.userapi.com/c834401/v834401887/cacc8/LHpcXLE06EI.jpg опять не получилось
Anonymous
#ifndef STRING1_H #define STRING1_H #include <iostream> using std::ostream; using std::istream; class String { private: char* str; int len; static int num_strings; static const int CINLIM = 80; public: String(const char* s); String(); // default constructor String(const String&); // copy-constructor ~String(); // destructor int length() const {return len;} // overloaded methods for operations String& operator=(const String&); String& operator=(const char*); char& operator[](int i); const char& operator[](int i) const; // friendly-functions for overloaded operators friend bool operator<(const String& st, const String& st2); friend bool operator😠const String& st1, const String& st2); friend bool operator==(const String& st, const String& st2); friend ostream& operator«(ostream& os, const String& st); friend ostream& operator»(istream& is, String& st); // static function static int HowMany(); }; #endif // STRING1_H
Anonymous
почему тут ошибка в 31 строке?
Anonymous
т.е. тут:
Anonymous
friend ostream& operator»(istream& is, String& st);
Ildar
заверни код в бектики: `
Ildar
ща сам
Ildar
#ifndef STRING1_H #define STRING1_H #include <iostream> using std::ostream; using std::istream; class String { private: char* str; int len; static int num_strings; static const int CINLIM = 80; public: String(const char* s); String(); // default constructor String(const String&); // copy-constructor ~String(); // destructor int length() const {return len;} // overloaded methods for operations String& operator=(const String&); String& operator=(const char*); char& operator[](int i); const char& operator[](int i) const; // friendly-functions for overloaded operators friend bool operator<(const String& st, const String& st2); friend bool operator>(const String& st1, const String& st2); friend bool operator==(const String& st, const String& st2); friend ostream& operator<<(ostream& os, const String& st); friend ostream& operator>>(istream& is, String& st); // static function static int HowMany(); }; #endif // STRING1_H
Anonymous
могу весь проект сюда выложить
Anonymous
ух ты
Anonymous
файл .pro так выглядит:
Anonymous
`TEMPLATE = app CONFIG += console c++11 CONFIG -= app_bundle CONFIG -= qt SOURCES += \ string1.cpp \ sayings2.cpp HEADERS += \ string1.h`
Anonymous
без ` там
Ildar
ты не один бектик ставь, а три
Anonymous
ок
Ildar
один это на однострочники, на многострочники надо 3
Anonymous
TEMPLATE = app CONFIG += console c++11 CONFIG -= app_bundle CONFIG -= qt SOURCES += \ string1.cpp \ sayings2.cpp HEADERS += \ string1.h
Anonymous
я нашел у себя опечатку
Anonymous
сейчас ищу дальше
Anonymous
в других файлах
Simon
Если надо выделить внутри предложения - ставишь одну ` в начале и в конце.
Simon
Если надо выделить блок - три ` в начале и в конце.
Anonymous
все опечатки убрал
Anonymous
но не компилится всё равно
Anonymous
в хедере и в реализации класса ошибки пишет
Vitaly
ну т.к. в чём проблема их исправлять одну за одной?
Anonymous
каждую строку проверил)
Vitaly
так он же пишет, где именно и какая ошибка
Vitaly
и строчку указывает и саму ошибку
Anonymous
пишет new decloration и номер строки
Anonymous
istream& operator>>(istream& is, String& st) // simple String input { char temp[String::CINLIM]; is.get(temp, String::CINLIM); if (is) st = temp; while(is && is.get() != '\n') continue; return is; }
Anonymous
istream& operator>>(istream& is, String& st) // 1 { char temp[String::CINLIM]; // 2 is.get(temp, String::CINLIM); // 3 if (is) st = temp; while(is && is.get() != '\n') continue; return is; }