Click here to Skip to main content
15,887,344 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Read String Pin
Chris Losinger2-Aug-10 4:14
professionalChris Losinger2-Aug-10 4:14 
GeneralRe: Read String Pin
Cedric Moonen2-Aug-10 4:33
Cedric Moonen2-Aug-10 4:33 
GeneralRe: Read String Pin
Iain Clarke, Warrior Programmer3-Aug-10 2:09
Iain Clarke, Warrior Programmer3-Aug-10 2:09 
AnswerRe: Read String Pin
Nemanja Trifunovic2-Aug-10 4:58
Nemanja Trifunovic2-Aug-10 4:58 
AnswerRe: Read String Pin
Moak2-Aug-10 5:20
Moak2-Aug-10 5:20 
GeneralRe: Read String Pin
Emilio Garavaglia2-Aug-10 20:25
Emilio Garavaglia2-Aug-10 20:25 
GeneralRe: Read String Pin
Moak2-Aug-10 22:26
Moak2-Aug-10 22:26 
GeneralRe: Read String Pin
Emilio Garavaglia3-Aug-10 20:17
Emilio Garavaglia3-Aug-10 20:17 
Moak wrote:
The beauty of STL glows in less trivial examples


Oh yes ... but reality is different: it is a matter of fact that vector (sequential indexed), list (sequential) and map (indexed) don't have same interfaces, and that the most of stl algorithm that are "non trivial" works with "sequential indexed" (aka "random access") iterators.

Two siple example:
std::list<int> alist;
std::vector<int> avector;

alist.remove(10); //remove all 10s
avector.erase(std::remove(avector.begin(),avector.end(),10),avector.end());


Until someone doesn't demonstrate me how can I come to write the second example without having the knowledge of at least 20 pages of documentation (yes, I want a 8 y.o. baby coding that!), I will consider "you can use the same algorithm with a wide range of objects... and only have to learn it once = time saved." a pure marketing lye.

(The fake is that vector doesn't have a remove function, hence is not dual to list, and std::remove doesn't remove: it just swaps things around. You cannot know that unless someone tells you)

The pattern itself can be a good idea (iterators as a bridge between collections and algorithms) but the way is implemented is far from being obvious.
That's the point i was considering.

2 bugs found.
> recompile ...
65534 bugs found.
D'Oh! | :doh:


GeneralRe: Read String Pin
Moak3-Aug-10 22:22
Moak3-Aug-10 22:22 
QuestionCOM interface disappears from ROT [modified] Pin
Phil J Pearson2-Aug-10 1:09
Phil J Pearson2-Aug-10 1:09 
AnswerRe: COM interface disappears from ROT Pin
Code-o-mat2-Aug-10 1:18
Code-o-mat2-Aug-10 1:18 
GeneralRe: COM interface disappears from ROT Pin
Phil J Pearson2-Aug-10 1:51
Phil J Pearson2-Aug-10 1:51 
GeneralRe: COM interface disappears from ROT Pin
Code-o-mat2-Aug-10 1:59
Code-o-mat2-Aug-10 1:59 
GeneralRe: COM interface disappears from ROT Pin
Phil J Pearson2-Aug-10 2:07
Phil J Pearson2-Aug-10 2:07 
AnswerRe: COM interface disappears from ROT Pin
Phil J Pearson2-Aug-10 2:19
Phil J Pearson2-Aug-10 2:19 
GeneralRe: COM interface disappears from ROT Pin
Code-o-mat2-Aug-10 2:24
Code-o-mat2-Aug-10 2:24 
QuestionClistCtrl Pin
alexander 19831-Aug-10 23:59
alexander 19831-Aug-10 23:59 
AnswerRe: ClistCtrl Pin
«_Superman_»2-Aug-10 0:14
professional«_Superman_»2-Aug-10 0:14 
AnswerRe: ClistCtrl Pin
David Crow2-Aug-10 2:49
David Crow2-Aug-10 2:49 
AnswerRe: ClistCtrl Pin
bleedingfingers2-Aug-10 3:18
bleedingfingers2-Aug-10 3:18 
AnswerRe: ClistCtrl Pin
KarstenK2-Aug-10 4:02
mveKarstenK2-Aug-10 4:02 
QuestionGet session based Cookies in C++ BHO Pin
Aendy1-Aug-10 22:16
Aendy1-Aug-10 22:16 
AnswerRe: Get session based Cookies in C++ BHO Pin
«_Superman_»1-Aug-10 23:27
professional«_Superman_»1-Aug-10 23:27 
GeneralRe: Get session based Cookies in C++ BHO Pin
Aendy2-Aug-10 0:46
Aendy2-Aug-10 0:46 
Questionfailed to start because MSVCP71.dll was not found ! ? Pin
zon_cpp1-Aug-10 19:48
zon_cpp1-Aug-10 19:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.