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 / dbReadString, problem with it!?!?!

Author
Message
helpfull programmer
14
Years of Service
User Offline
Joined: 30th Jul 2009
Location:
Posted: 11th May 2010 23:56
Hello one and all! ^.^

This forum is amazing! I just have a question which I know you will all be able to answer, so here goes...

I am trying to read an IP from a file using dbReadString but to no luck, I can read bytes and Ints just fine.. any help would be greatly appreciated!

here is some code, please don't flame if I don't do it right :-P



Thank you very much!
from helpfullprogrammer.
Serial Velocity
15
Years of Service
User Offline
Joined: 24th Aug 2008
Location:
Posted: 12th May 2010 00:19
Well for a start, don't use DarkGDK's file commands, as they are known to be unreliable. Take a look at std::fstream (tutorial), or you could use my file class in my utilities lib (sig).

GDKUtilities, a utility library for DarkGDK, avaliable here
Freedom Fighters
14
Years of Service
User Offline
Joined: 2nd Nov 2009
Location:
Posted: 12th May 2010 09:18 Edited at: 12th May 2010 09:19
Example File I/O


Thats a simple example of a file i/o
its more efficent than the GDK commands

Problem Solution That Never Fails: "Build A Bridge And Get Over It"
helpfull programmer
14
Years of Service
User Offline
Joined: 30th Jul 2009
Location:
Posted: 12th May 2010 18:06
Thank you guys, but how can I convert string to char* as that is the format which I wish to manipulate, thanks again in advance!
from helpfullprogrammer.
helpfull programmer
14
Years of Service
User Offline
Joined: 30th Jul 2009
Location:
Posted: 12th May 2010 18:26
Don't worry, got it sorted. Thank you everyone!!!!
Freedom Fighters
14
Years of Service
User Offline
Joined: 2nd Nov 2009
Location:
Posted: 13th May 2010 11:42
hope the File I/O was helpful

Problem Solution That Never Fails: "Build A Bridge And Get Over It"
CJX3711
14
Years of Service
User Offline
Joined: 16th Jun 2010
Location:
Posted: 16th Jun 2010 18:46 Edited at: 17th Jun 2010 05:58
This may be a little late and out of place, but why can't I include the string library? My program works perfectly, but when I include the library, I get a linkage error.



Sorry for the intrusion.

--Edit--
Erm, nevermind, I found out how to solve it. Sorry.
How do I delete a post?

Login to post a reply

Server time is: 2024-07-07 01:14:09
Your offset time is: 2024-07-07 01:14:09