.:: 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 Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Using STL in bot ?
Old
  (#1)
koraX
Member
 
koraX's Avatar
 
Status: Offline
Posts: 145
Join Date: Jan 2004
Location: Slovak Republic
Default Using STL in bot ? - 23-07-2004

Is somebody using STL in his bot, or do you think it is a good idea ?

STL stands for Standard template library and it is part of ANSI C++.

IMO pros/cons of STL :
Advantages :
- portability. You can compile it under any decent compiler
- stl::string class. Definatelly better than char *
- stl::vector class. Easy to use, quick and safe. (constant time insertion, linear time searching)
- stl::stack class. Easy to use, safe. Simple, very simple
- searching and sorting. Again very easy and quick

Disadvantages :
- ??? speed ??? I don't know if stl is slower or faster. It can be slower because of lots of background code, BUT it may be faster because of efficient code
- size of code. Well it is bigger with using all those stl libraries


I'm asking because I'm doing some stuff to my bot and can't decide whether to go the easy way (stl), or try to stay at C standards.

Some link for those who doesn't know STL :
kinda official site : http://www.sgi.com/tech/stl/
some good for starters : http://www.msoe.edu/eecs/cese/resources/stl/index.htm


kXBot
koraX's utils
- see my homepage for other projects (OpenGL CSG Editor, FAT16 Sim, NNetwork Sim, ...)
  
Reply With Quote
Re: Using STL in bot ?
Old
  (#2)
Rick
Council Member
 
Rick's Avatar
 
Status: Offline
Posts: 690
Join Date: Dec 2003
Location: Holland
Default Re: Using STL in bot ? - 23-07-2004

If I use STL and the warning level is on 4 i get like 1000 warnings... Also sometimes compile errors appear when using STL with linux :-\
Well so far I only used the STL string and that one is pretty neat
  
Reply With Quote
Re: Using STL in bot ?
Old
  (#3)
koraX
Member
 
koraX's Avatar
 
Status: Offline
Posts: 145
Join Date: Jan 2004
Location: Slovak Republic
Default Re: Using STL in bot ? - 23-07-2004

Quote:
Originally Posted by Rick
If I use STL and the warning level is on 4 i get like 1000 warnings... Also sometimes compile errors appear when using STL with linux :-\
Microsoft visual studio 6.0 has known issues with STL. MSVC .NET should be fine.

I compiled my program under gcc 2.95.4 and MSVC .NET 2003 on warning level 4 and no warnings so far. I'm using strings, vecrots, stacks, iterators, file, stream and string buffers ...


kXBot
koraX's utils
- see my homepage for other projects (OpenGL CSG Editor, FAT16 Sim, NNetwork Sim, ...)
  
Reply With Quote
Re: Using STL in bot ?
Old
  (#4)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: Using STL in bot ? - 23-07-2004

the STL is pretty effective, it's hard to beat the performance, maybe you might succeed when able to optimize something really specific

the size of the compiled dll shouldnt be a problem ...


  
Reply With Quote
Reply


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

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