pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)
[personal profile] pne

…when you're programming C and call a function that takes no parameters and forget the parentheses.

I had code something like mystream << myObject->GetAttribute; and the compiler complained that it didn't know what to do with this and asked me which overridden << operator it should use… of course, the one taking an tAttribute as its second argument!

Then I saw what was wrong and added the parentheses in GetAttribute(). Oopsie.

Date: Friday, 1 August 2003 03:49 (UTC)
From: [identity profile] nik-w.livejournal.com
haha - very good:)

Date: Friday, 1 August 2003 08:31 (UTC)
From: [identity profile] bride.livejournal.com
Or you stick '$' on a variable and then get yelled at. =)

Date: Friday, 1 August 2003 08:45 (UTC)
ext_78: A picture of a plush animal. It looks a bit like a cross between a duck and a platypus. (Default)
From: [identity profile] pne.livejournal.com
I know somebody who did #define unless(text) if(!(text)) or something like that because he kept being bitten by C's not knowing what "unless" meant.

Then when he had that down, he'd get bitten by things such as foo = 25 if bar() ;)

Profile

pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)
Philip Newton

June 2015

S M T W T F S
 12 3456
78910111213
14151617181920
2122232425 2627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Thursday, 1 January 2026 02:33
Powered by Dreamwidth Studios