![]() |
Using STL in bot ?
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 |
Re: Using STL in bot ?
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 :) |
Re: Using STL in bot ?
Quote:
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 ... |
Re: Using STL in bot ?
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 ... |
All times are GMT +2. The time now is 02:34. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.