Jump to content
Sign in to follow this  
pustekuchen

static std::string not initialized

Recommended Posts

Hello all,

 

for a project I use WebSocket++. There is a base64 encoding function

base64_encode

 

In this function, 

static std::string const base64_chars

is accessed. For some reason base64_chars points to NULL, which should not be the case. The encoding then produces rubbish data, of course.

I'm mixing Delphi and CPP here.

I've used the example from David Millington and extended it ,to reproduce this case. In CPPClass.cpp is a static const std::string, which will not displayed in the message, after pressing the button. (Example is attached in this thread)

 

Does anyone have an idea what this could be? Is it possibly a bug in bcc32c ?

 

with kind regards
Marc

 

[Duplicate in german forum]

uninitialized_globale_var_in_cpp_package.zip

Edited by pustekuchen

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×