diff --git a/src/sdk-reference/cpp/1/kuzzle/getters/snippets/getters.cpp b/src/sdk-reference/cpp/1/kuzzle/getters/snippets/getters.cpp index 5d46edd80..8f0441f4b 100644 --- a/src/sdk-reference/cpp/1/kuzzle/getters/snippets/getters.cpp +++ b/src/sdk-reference/cpp/1/kuzzle/getters/snippets/getters.cpp @@ -1,5 +1,5 @@ -kuzzleio::Kuzzle *kuzzle = new kuzzleio::Kuzzle( - new kuzzleio::WebSocket("kuzzle")); +kuzzleio::WebSocket *ws = new kuzzleio::WebSocket("kuzzle"); +kuzzleio::Kuzzle *kuzzle = new kuzzleio::Kuzzle(ws); std::string jwt_token = kuzzle->jwt(); @@ -21,4 +21,4 @@ bool auto_reconnect = kuzzle->autoReconnect(); bool auto_replay = kuzzle->autoReplay(); -bool auto_resubscribe = kuzzle->autoResubscribe(); \ No newline at end of file +bool auto_resubscribe = kuzzle->autoResubscribe();