• Advertisement
Sign in to follow this  

A quick question

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to use a #define for a string #define COPYRIGHT1_STRING © 2004 2005 Will that work or do the spaces break it? Do i need to use quotes?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
const char copyrightstring [] = "© 2004 2005";

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
const char copyrightstring [] = "© 2004 2005";
How well does a regular char cope with a copyright sign? Would you not have to use wide characters?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You are right. But he can use

const char copyrightstring [] = "(c) 2004 2005";

which is also commonly accepted.

Share this post


Link to post
Share on other sites
Quote:
Original post by benryves
Quote:
Original post by Anonymous Poster
const char copyrightstring [] = "© 2004 2005";
How well does a regular char cope with a copyright sign? Would you not have to use wide characters?


The ISO-8859-1/Windows-1252/Windows (Western) codepage has the © symbol in the extended ASCII. In fact, all non-Asian Windows codepages have it, including Viet Nam.

Share this post


Link to post
Share on other sites
Ahh see here is the problem!

I need this to work for both Java and C++ so i need the preprocessor to sub in the string where its used.

So can a define do this? The const char wont do the job for what i need of it.

Thanks guys!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement