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 / C++ What are you guys using for String Manipulation and Linked Lists? (dyn arrays)

Author
Message
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 8th Sep 2007 18:21
I'm mid jump from Darkbasic to GDK C++ - and I was wondering what you guys are using to do your string manipulation.

Note: I read the thread in here where IanM said use <string> to get the string object and not use "string.h" but I did that and
fails

Also I would like a decent hint on a good base class to use for double linked lists - (collections maybe if fast) I could write all my own everything but it will take weeks before I get to my first "walk around in advanced terrain" Any suggestions appreciated!

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Sep 2007 22:36
Perhaps a little more detail than 'fails' would assist us in assisting you

I suspect that you've just forgotten to include the namespace of the string object:


Use std::list for a doubly-linked list.
Use std::map for indexed lookup.
Use std::vector instead of arrays.
Use std::string for strings.

Basically, find a good STL book, buy it and read it.

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 8th Sep 2007 22:41
Ahhh - didn't try qualifying with namespace. Hmm. ("Fails" meant


std::somethinghere is a syntax I haven't tried.

(I was halfway through a linked list class when I got this - going to investigate right now)

Thanx for the help.


Login to post a reply

Server time is: 2024-11-16 20:48:01
Your offset time is: 2024-11-16 20:48:01