Common header file for C++ and JavaScipt

Posted by paperjam on Programmers See other posts from Programmers or by paperjam
Published on 2012-09-28T16:01:08Z Indexed on 2012/09/28 21:50 UTC
Read the original article Hit count: 388

Filed under:
|
|
|

I have an app that runs a C++ server backend and Javascript on the client. I would like to define certain strings once only, for both pieces of code. For example, I might have a CSS class "row-hover" - I want to define this class name in one place only in case I change it later.

Is there an easy way to include, or read, some sort of common definitions file into both C++ and JavaScript? Ideally as a compile / preprocessing step but any neat approach good.

© Programmers or respective owner

Related posts about c++

Related posts about JavaScript