You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2022/04/20 08:46:37 UTC

[pulsar] branch master updated: Example code was not compiling properly (#15215)

This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new fd0532c41a3 Example code was not compiling properly (#15215)
fd0532c41a3 is described below

commit fd0532c41a3e981f4267c122c308ac8f40304831
Author: AlvaroStream <10...@users.noreply.github.com>
AuthorDate: Wed Apr 20 10:46:31 2022 +0200

    Example code was not compiling properly (#15215)
    
    This small changes make the examples compile properly in Debian after installing the libraries from the .deb packages.
---
 site2/docs/client-libraries-cpp.md | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/site2/docs/client-libraries-cpp.md b/site2/docs/client-libraries-cpp.md
index 788453eb8ab..28796ca800e 100644
--- a/site2/docs/client-libraries-cpp.md
+++ b/site2/docs/client-libraries-cpp.md
@@ -323,6 +323,8 @@ using namespace pulsar;
 
 int main() {
     Client client("pulsar://localhost:6650");
+    
+    Producer producer;
 
     Result result = client.createProducer("persistent://public/default/my-topic", producer);
     if (result != ResultOk) {
@@ -364,6 +366,7 @@ Without this configuration, the result code `ResultProducerQueueIsFull` is passe
 ```c++
 #include <pulsar/Client.h>
 #include <thread>
+#include <atomic>
 
 using namespace pulsar;