Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / void dbInput(std::string statement, void *out, int_32t outSize) with C++

Author
Message
JohnFT
8
Years of Service
User Offline
Joined: 6th Apr 2011
Location:
Posted: 28th Feb 2013 17:52
Anyone use this with C++ yet? I'm trying to place simple text on a DB screen/window, telling you to enter a 0 or 1 (and then press enter), and have it place that integer into a variable. An error shows up in the C++ code. I would think it would be quite simple, doesn't seem like it should be too complicated! Can't figure it out! Can anyone shed some light on this for me? Thanks!
Rudolpho
13
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 1st Mar 2013 11:50 Edited at: 1st Mar 2013 11:51
It most likely returns a c-string which size will be set to outSize.
If that is the case you could achieve what you want like so:


Note: the above code is just written on the fly and not tested, as such it might contain errors. It displays the general approach to doing it even should it not work as-is thouogh.


"Why do programmers get Halloween and Christmas mixed up?"

Login to post a reply

Server time is: 2019-11-17 15:56:45
Your offset time is: 2019-11-17 15:56:45