Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

namespace and #define

Name: Anonymous 2010-09-30 4:03

Hello

I noticed that when I use #define inside a namespace then this #define only
works when prefixed with the namespace name.

Is this behaviour standard or just compiler specific?

I use VC7.

namespace test
{
#define X int
};

Now can be used as:

test::X

--
Elias

Name: Anonymous 2011-03-01 20:21

>>40
Stop testing. You think we won't notice you even though this is not on the front page?

Name: Anonymous 2011-03-01 20:28

True story.

A female coworker of mine (inb4 no women in CS) wrote the following:

#define temp_too_high
if ( temp > 100 )
{
    #define temp_too_high true
}
else
{
    #define temp_too_high false
}

// ...

if ( temp_too_high )
{
    // safety mechanism for high temperature
}

Name: Anonymous 2011-03-01 20:30

>>44
implying that's ``computer science''

Name: Anonymous 2011-03-01 20:43

>>45
Go away, ``noko''.

Name: Anonymous 2011-03-01 20:51

>>46

u mad?

Name: Anonymous 2011-03-01 22:17

>>46
Fuck off, ``faggot''.

Name: Anonymous 2011-03-01 22:48

>>20
>>20
I'll help you when my C compiler is downloaded and installed.

Name: Anonymous 2011-03-01 23:00

>>20
Didn't notice that was 2010, you must be dead now.

Name: Anonymous 2011-03-01 23:24

Use a real language where macros, are actuallu macros.

Name: Anonymous 2011-03-02 2:41

>>1
S͔̥̠͉̲̺̖̖͢͜ͅe҉̸͍͙̤͎͖͎̼̟̗̯̩̫̣̩̘̭̙͙̭g͏̴̷̛̭̞̩̖̫͉̮̬̤͔ͅḿ̶̡̻͈̫͎̻̜̭̠͈̤͠ͅe̶̸̸͍͕̙͕̜̝͉͖͎̮̹̫̩͚͇̪̱͞n͘҉̢͎̬̥̫̲̮̗͙̮̥͎̣͚͈̞t̴̶̢̩̼͇̖͍͎̞͚̮͙̖̗̤̯̣̣̰̰̀́a̴̩̮̱͉̤̝̼͈͚̜̬̥̫̩̻̬͟ͅt̨̜͈̯̝̱͕͕͓͍̠̱̼̣͎̘̺̭͞i̸̧̢̯̜̯̝͙͕͕̬̹̥̻͔̗͢͠o̢̱̝̪͕͜͡n̵͓̞̠̮̰̳̩͕͘͟͢ ̛̞̰̬͓̥̥́͢ͅF҉̶̸̡̜̳̣͍͓͈̖̱͖̗̕à̢͈̲͙̙̳̱̹ù̡̫͓̺͓̕ĺ̨̯̮̭̖̹̠̱̠̭̬̺̳͍̼̬̺̤̲̯͟͞͡t̢̙̗͈̝̼̠͓̺͖̦͎͚̟̳̹̥̬́̕͡

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List