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 / newbie problems

Author
Message
Ashy
18
Years of Service
User Offline
Joined: 1st Nov 2005
Location:
Posted: 13th Aug 2006 09:31
Hi guys, I searched and found afew posts on using strings with the gdk, and while I have tried those solutions I still can't get them to work, mostly because i'm very new to c/c++.



I cut and pasted the parts in question from my program. I've prototyped the load_settings function in the main.h file.. everything works ok if i comment out all the string stuff. I've tried different combinations of getting the string to work but yeah, i'm new. I do have a book i borrowed from the library plus I ordered two stephen prata ones from amazon (waiting to be delivered).

Also, while i'm making a post I may aswell ask some other questions.. I'm trying to get the following code from dbp to work with the gdk;



I tried rewriting it to what i thought it would be;



I prototyped the functions in the main.h file.. I can get the first two functions to work, but after that I get too many errors to know what I'm doing lol. I block comment out most of the functions and try to solve one at a time. I know someone will probaly read this and say "why not use cout,cin and do your file reading writing functions that way".. well I thought it would be easier to change an already existing function to work with the gdk than write one from scratch.. and I like the way the text file comes out when using these functions..



Could someone maybe rewrite one as an example (preferable) or point me in the right direction please.
Wilvis
17
Years of Service
User Offline
Joined: 6th Aug 2006
Location:
Posted: 13th Aug 2006 19:38
Quote: "void load_settings(void) { object a; a.name("hello this is what seems to be a string"); dbPrint(const_cast<char*>(a.name.c_str())); }"


Shouldn't that be

EddieB
19
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 15th Aug 2006 11:45
Heres some functions I wrote for a big library im working on.



Should work just fine for you
EddieB
19
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 21st Aug 2006 13:39
Hey ashly,

I got your email, but my email sending isnt working...

Try creating a blank file.ini and then try the code.. works fine here...

Cheeres,Eddie

Login to post a reply

Server time is: 2024-06-17 08:41:15
Your offset time is: 2024-06-17 08:41:15