.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Programming
General Programming Help others and get yourself helped here!

Reply
 
Thread Tools
Re: Any of you string/pointer/memory guru's out there who can help me?
Old
  (#11)
botmeister
Ex-Council Member
 
botmeister's Avatar
 
Status: Offline
Posts: 1,090
Join Date: Nov 2003
Location: Canada
Default Re: Any of you string/pointer/memory guru's out there who can help me? - 09-04-2004

Are all you guys masochists or something? Why subject yourself to the horrible pain of zero based character array manipulation when you could be using the standard C++ string class?


Maker of the (mEAn) Bot.Admin Manager

"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut
  
Reply With Quote
Re: Any of you string/pointer/memory guru's out there who can help me?
Old
  (#12)
Rick
Council Member
 
Rick's Avatar
 
Status: Offline
Posts: 690
Join Date: Dec 2003
Location: Holland
Default Re: Any of you string/pointer/memory guru's out there who can help me? - 10-04-2004

I dunno later on I want to but I think I'm to lazy to learn to use them and since I already use C strings... But I read some stuff about it and indeed its way simpeler. Especially I like the way you can use operators like == and += normaly. O well some day....
  
Reply With Quote
Re: Any of you string/pointer/memory guru's out there who can help me?
Old
  (#13)
botmeister
Ex-Council Member
 
botmeister's Avatar
 
Status: Offline
Posts: 1,090
Join Date: Nov 2003
Location: Canada
Default Re: Any of you string/pointer/memory guru's out there who can help me? - 10-04-2004

Rick, there's not much to learn about the string class really. The on going productivity loss futzing around with c strings will never end, so investing a couple hours into learning how to use the string class is well worth it.

http://www.msoe.edu/eecs/ce/courseinfo/stl/string.htm


Maker of the (mEAn) Bot.Admin Manager

"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut
  
Reply With Quote
Re: Any of you string/pointer/memory guru's out there who can help me?
Old
  (#14)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Any of you string/pointer/memory guru's out there who can help me? - 10-04-2004

I'm still gonna stick to the character arrays, in spite of all this... yes.

I like to know where every single byte of memory goes to

That's not a drawback for me because my code is usually rather ANSI C than C++.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Any of you string/pointer/memory guru's out there who can help me?
Old
  (#15)
botmeister
Ex-Council Member
 
botmeister's Avatar
 
Status: Offline
Posts: 1,090
Join Date: Nov 2003
Location: Canada
Default Re: Any of you string/pointer/memory guru's out there who can help me? - 12-04-2004

Quote:
Originally Posted by Pierre-Marie Baty
I'm still gonna stick to the character arrays, in spite of all this... yes.

I like to know where every single byte of memory goes to

That's not a drawback for me because my code is usually rather ANSI C than C++.
You could always write your own string class, there's not that much too it, esp if you just wrap the old C routines into it. But I hear you're not yet into C++?


Maker of the (mEAn) Bot.Admin Manager

"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut
  
Reply With Quote
Re: Any of you string/pointer/memory guru's out there who can help me?
Old
  (#16)
Magnus
Guest
 
Status:
Posts: n/a
Default Re: Any of you string/pointer/memory guru's out there who can help me? - 01-06-2004

"You could always write your own string class"

Exactly
  
Reply With Quote
Re: Any of you string/pointer/memory guru's out there who can help me?
Old
  (#17)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: Any of you string/pointer/memory guru's out there who can help me? - 01-06-2004

Quote:
Originally Posted by Magnus
"You could always write your own string class"

Exactly
if you got nothing better to do ... but let's keep this discussion where it started !


  
Reply With Quote
Re: Any of you string/pointer/memory guru's out there who can help me?
Old
  (#18)
Killaruna
Moderator
 
Status: Offline
Posts: 32
Join Date: Jan 2004
Location: Heidelberg, Germany
Default Re: Any of you string/pointer/memory guru's out there who can help me? - 02-06-2004

Quote:
Originally Posted by Pierre-Marie Baty
omfg, if the hwole RealBot is written this way, then it's driven by MAGIC !
! Couldn't resist to quote that, too funny...
  
Reply With Quote
Re: Any of you string/pointer/memory guru's out there who can help me?
Old
  (#19)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Any of you string/pointer/memory guru's out there who can help me? - 03-06-2004

beware dude, just publish the Parabot sources and Stefan will hunt down every single bug to nag you with it!



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com