6 Topics

Member Avatar for Bench

This code snippet outlines a simple, no-frills linked list. Tested under MSVC++ 2003 and Comeau, but not guaranteed bug free. Snippet includes example main() . This snippet is intended as an example of a possible implementation of a linked list class (Of which there are many variations) For a better …

Member Avatar for Narue
0
3K
Member Avatar for Bench

For anyone who gets fed up with the somewhat verbose syntax involved in populating an STL map container with static arrays of std::pair (Or any of the other somewhat tedious ways of writing 'pair' combinations), here is a function which allows two different (statically allocated) arrays, of equal length, to …

Member Avatar for vijayan121
0
2K
Member Avatar for Bench

The C++ [i]string[/i] type can be converted to a [b]const[/b] null-terminated string using [icode].c_str()[/icode] for interoperability with legacy C code. However, this poses a potential problem when mixing [i]std::string[/i] with functions designed to mutate a string in-place. a const_cast to get around this issue results in undefined behaviour, since the …

0
965
Member Avatar for Bench

I wonder if anyone has seen this before - a programming 'language' aimed at young children. Of course, not really a programming language in the usual sense, and certainly not going to produce the next Quake game, but a great idea to introduce people to the basic ideas of programming …

Member Avatar for hbk619
0
134
Member Avatar for Bench

[B]Intro[/B] The focus of this tutorial is the code relating to decision making and selection, and not the I/O code. I [U]do not[/U] advocate using scanf() in this way for anything other than testing blocks of code in 'toy' programs. If you feel the need to use scanf() when writing …

Member Avatar for Dave Sinkula
0
3K
Member Avatar for Bench

Hello, This is mainly a message to Dani (although interested to know whether anyone else has seen this..) The the PM message frame extends too far to the right (at least on my screen @ res 1280x1024). It cuts off the right-hand-side of the PM message window, so long lines …

Member Avatar for Dani
0
128

The End.