# Token Pasting Operator Woes

This topic is 2415 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Ok, so is this proper use of the token-pasting and stringizing operator? It seems I'm making a mistake somewhere...

 #define LINK_TO_ENTITY_FACTORY(className) \ IEntity* Create##className () \ { \ return new className; \ } \ \ EngineAPI ()->LearnEntity (#className, Create##className); 

Thanks as usual!

##### Share on other sites
iI don't know if you missed it or if the forum software just mangled your post, but multi-line macros must use \ characters at the end of each line to correctly continue after the break.

If that doesn't take care of it, you can configure the compiler to show you how it expanded the macro, which can help spot mistakes. The specifics depend on what particular compiler you're using.

##### Share on other sites
I never knew you could have VS spit out that kind of information!
Anyway, seems that it's working right and the problem must be somewhere else.

Thanks!

##### Share on other sites
Hidden
What does the signature of LearnEntity() look like? You seem to be passing it a class name as the first parameter, which would be invalid syntax.