I was looking through the source code to a game, and I came accross this line:

static ConCommand name##_command( #name, name, description, flags );

I was wondering what all the hashes(#) do ??

Recommended Answers

All 3 Replies

# and ## are C++ Preprocessor.

1. Stringizing Operator (#)
2. Token-Pasting Operator (##)

What on earth does that do? :P

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.