When we declare a std::vector, or std::string, …, like that for example std::string hello("Hello"); isn’t it wrong? shouldn’t we do std::string hello; try { hello = "Hello"; } catch (std::exception &e) { std::cout << e.what() << std::endl; return (-1); } Because if I understood how it works, when an allocation fails, it will result in ..

Read more

I have just created my first graphical application with the GTK library and I have a little problem. The application only opens a window of type GtkWidget and shows it to the user as a test. When compiling this application with Linux g ++, the application opens correctly. When compiling this application with MinGW g ..

Read more

Im following these steps to install Paho MQTT library for cpp: sudo apt-get install build-essential gcc make cmake cmake-gui cmake-curses-gui git doxygen graphviz libssl-dev git clone https://github.com/eclipse/paho.mqtt.c.git cd paho.mqtt.c git checkout v1.2.1 (tried v1.3.8 and v1.3.1) cmake -Bbuild -H. -DPAHO_WITH_SSL=ON sudo cmake –build build/ –target install sudo ldconfig cd .. git clone https://github.com/eclipse/paho.mqtt.cpp cd paho.mqtt.cpp ..

Read more