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 2010-10-01 15:24

>>20
First implement a function char *str_shift(const char *s, int how_much); and make sure it really works. Then, write a function int match_score(char *c); that takes every word in /usr/share/dict/words, ignoring 1-letter words, and tries to match it against the string, adding the length of the word to the score every time the word is matched. The rest should be fairly trivial.

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