IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New There's an A for the student that can make that work ;-)



That was lovely cheese.

     --Wallace, The Wrong Trousers
Collapse Edited by tuberculosis July 26, 2004, 01:55:03 PM EDT
There's an A for the student that an make that work ;-)



That was lovely cheese.

     --Wallace, The Wrong Trousers
New All they have to do is use a 2.x gcc compiler...
/me ducks for cover...
jb4
shrub\ufffdbish (Am., from shrub + rubbish, after the derisive name for America's 43 president; 2003) n. 1. a form of nonsensical political doubletalk wherein the speaker attempts to defend the indefensible by lying, obfuscation, or otherwise misstating the facts; GIBBERISH. 2. any of a collection of utterances from America's putative 43rd president. cf. BULLSHIT

New Class compiler is gcc 3.3



That was lovely cheese.

     --Wallace, The Wrong Trousers
New Hmm
Does a "Kobyashi Maru" solution work? That is, modify the compiler source code?

(BTW is this possible, seriously? Or is "this" a sacred token?)

-drl
New It's a sacred token
but that doesn't mean that a minor compiler fiddle could change the token name to something like 'self' (that's for you, Conrad...)
jb4
shrub\ufffdbish (Am., from shrub + rubbish, after the derisive name for America's 43 president; 2003) n. 1. a form of nonsensical political doubletalk wherein the speaker attempts to defend the indefensible by lying, obfuscation, or otherwise misstating the facts; GIBBERISH. 2. any of a collection of utterances from America's putative 43rd president. cf. BULLSHIT

New self is what all the real OO languages use



That was lovely cheese.

     --Wallace, The Wrong Trousers
New Dupe...Ignore
jb4
shrub\ufffdbish (Am., from shrub + rubbish, after the derisive name for America's 43 president; 2003) n. 1. a form of nonsensical political doubletalk wherein the speaker attempts to defend the indefensible by lying, obfuscation, or otherwise misstating the facts; GIBBERISH. 2. any of a collection of utterances from America's putative 43rd president. cf. BULLSHIT

Expand Edited by jb4 July 26, 2004, 05:02:22 PM EDT
New #define this THIS
Using "this" directly is not a frequent occurence in C++. As long as you don't, the above think will work. And if you do, you can always say

#undef this

before and

#define this THIS

after.

Can you say code obfuscation? I knew you could.

Edit: btw, in a cource on OO in C++, this deserves an F, not an A.



8<-------------------------------------------

#include <stdio.h>

#define this THIS

class A {
public:
A() : this(10){}
void printThis() {
printf("%d\\n", this);
}
private:
int this;
};

int main(int argc, char *argv[]) {
A a;
a.printThis();
}
--

"...was poorly, lugubrious and intoxicated."

-- Patrick O'Brian, "Master and Commander"
Expand Edited by Arkadiy July 26, 2004, 05:13:52 PM EDT
New Or for extra emphasis:
#define this THIS *THIS*, DAMMIT!
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New ICLRPD (new thread)
Created as new thread #166196 titled [link|/forums/render/content/show?contentid=166196|ICLRPD]
===

Implicitly condoning stupidity since 2001.
New That shouldn't be allowed then
On VC++ 6

#define this THIS
void main(void) {}

compiles OK

but

#define { BEGIN
#define } END

void main(void)
BEGIN
END

doesn't.

So it's a nethertoken.

-drl
New That's because you've got your #DEFINE statements backwards.
New -ugh-
-drl
     A nation of cheaters - (deSitter) - (35)
         Wow! Something we agree on! - (gdaustin) - (33)
             I enjoy your stuff. Just don't have much to say about it. -NT - (Another Scott)
             hang out here, yer fine -NT - (boxley)
             Did someone just write something? - (broomberg) - (6)
                 Gee, thanks. - (inthane-chan)
                 Zymurgy. - (Ashton) - (1)
                     Fermentation? Brewing? Huh? -NT - (broomberg)
                 You forgot someone - yourself - (lincoln) - (2)
                     Troll, thy name is Lincoln ;) - (inthane-chan) - (1)
                         He'd be more tolerable - (lincoln)
             I often don't agree with you - you're politically... - (CRConrad) - (1)
                 Yeah, but by NOT saying anything - (jb4)
             I read all your posts and even agree with some! ;) - (a6l6e6x) - (1)
                 Re: I read all your posts and even agree with some! ;) - (deSitter)
             Re: Wow! Something we agree on! - (Ashton)
             Thanks for the Vote of Confidence Guys... - (gdaustin) - (1)
                 Gonna have to get me a copy of that book - (bepatient)
             Service exists - (tuberculosis) - (15)
                 ICLRPD (new thread) - (Steve Lowe)
                 Uh-ohh! Don't give them that one in your C++ class! - (jb4) - (13)
                     There's an A for the student that can make that work ;-) -NT - (tuberculosis) - (12)
                         All they have to do is use a 2.x gcc compiler... - (jb4) - (1)
                             Class compiler is gcc 3.3 -NT - (tuberculosis)
                         Hmm - (deSitter) - (9)
                             It's a sacred token - (jb4) - (1)
                                 self is what all the real OO languages use -NT - (tuberculosis)
                             Dupe...Ignore -NT - (jb4)
                             #define this THIS - (Arkadiy) - (5)
                                 Or for extra emphasis: - (admin) - (1)
                                     ICLRPD (new thread) - (drewk)
                                 That shouldn't be allowed then - (deSitter) - (2)
                                     That's because you've got your #DEFINE statements backwards. -NT - (inthane-chan) - (1)
                                         -ugh- -NT - (deSitter)
             Devil in the details tho - (GBert)
         Dunno, Ross. - (imric)

Idle.
78 ms