Compile and update the examples in the README

This commit is contained in:
Gudmundur Adalsteinsson
2020-10-10 13:39:42 +00:00
parent 7a6c904f94
commit 379793cbab
4 changed files with 70 additions and 8 deletions

9
examples/hello_world.cpp Normal file
View File

@@ -0,0 +1,9 @@
#include <zmq.hpp>
int main()
{
zmq::context_t ctx;
zmq::socket_t sock(ctx, zmq::socket_type::push);
sock.bind("inproc://test");
sock.send(zmq::str_buffer("Hello, world"), zmq::send_flags::dontwait);
}