Tag Archives: C/C++

Nothing Could Fail in C

Best comment of the C programming language ever! via:reddit Here is the whole story: Going back to C by buddhabrot When I was 12 someone gave me a Metrowerks IDE to learn programming on my mac. I learned a lot … Continue reading

Posted in Programming | Tagged | Leave a comment

Patch to Broadcom 802.11 Linux STA driver for Kernel 2.6.27

Update 2009-01-04: As Jose mentioned, the latest driver (ver. 5.10.27.12) no longer needs this patch! If you have problem to compile Broadcom 802.11 Linux STA driver (version 5.10.27.6) on Kernel 2.6.27 and get error message like the following: /home/ye/downloads/bcm4328/hybrid_wl/src/wl/sys/wl_iw.c: In … Continue reading

Posted in Troubleshooting | Tagged , , , , | 8 Comments

How To Prevent Creating Objects On Heap

Yesterday I saw a C++ interview question that was asking the interviewees to prevent the clients from creating objects on heap. That is, you write a class and your class users can’t use new to create an object. Here is … Continue reading

Posted in Programming | Tagged | 1 Comment

Solving Cyclic Dependencies Is Hard

I am a C/C++ beginner but I’d been already taught that dependency cycles are generally evil since it’s very hard to solve. I haven’t realized how hard the problem is before, because all the works I’ve done are “one file” … Continue reading

Posted in Linux, Programming | Tagged | 1 Comment

Weird Hex Output

In C++, to output and integer in hex, I’d been taught to do this: cout << hex << an_integer; And if I want to show “0x” before the value, I need to do the following: cout.setf(ios::showbase); cout << hex << … Continue reading

Posted in Programming | Tagged | Leave a comment