A dreadful thing

Saturday, October 4th, 2008 10:32
[personal profile] kpreid
some type *foo;
size_t count = ...;

...

foo = malloc(count * sizeof * foo);

Horrible

Date: 2008-10-07 05:28 (UTC)
From: (Anonymous)
It is one more example for the horrible syntax that C or C++ allow.

See also:

- C++ Pitfalls: http://www.horstmann.com/cpp/pitfalls.html
- C++ FQA lite: http://yosefk.com/c++fqa/
- C++?? : A Critique of C++ (3rd Ed.): http://burks.bton.ac.uk/burks/pcinfo/progdocs/cppcrit/