hello anyone i want to copyrigt my souce code so that the copyright message is hidden from anyone who open the code in c++ but show the message on console screen for example property belong to "my name" it doesnot appear on the cpp or not easy to remove but display on output screen?

First off, is this an open-source project, or one where the source is distributed for some other purpose? If you are distributing the program solely as binaries, then there is little reason to do this; editing compiled object code, even with a hex editor or a decompiler, is extremely difficult, and if they are able to do that, then obfuscating the code for the copyright notice will be the least of your concerns.

OTOH, if it is an open-source project, then obfuscating the copyright notice is counterproductive, as a) anyone altering it for any nefarious purposes will simply bypass that section of code if they are unable to understand it, and b) as the project administrator you should have the original code in source control (I should hope, at least), so restoring any changes should be a trivial matter.

Mind you, as long as you are the rightful creator of the code, and have documented this fact adequately for legal purposes, anyone changing the copyright notice will be in violation of copyright laws in any country that actually supports intellectual rights; and conversely, if it is in a nation that doesn't, you would have no legal recourse in any case, as the copyright would be meaningless there. It is true that there are several places around the world, in Eastern Europe especially, where intellectual property rights are legally in place but routinely go unenforced, but an outright violation like this is likely to be enforceable even there - if you even discover it in the first place. If the people involved aren't reselling the altered program on the black market, then the chances of catching them at it are virtually nil, rendering the issue of copyright notices moot.

If you are going to bother with obfuscating the code in any manner at all - and for compiled code there isn't much reason to do so - then you should do it for the entire program with some automatic obfuscation program such as Shroud (or whatever the current equivalent is, I haven't exactly kept up with the subject); a quick search turns up Stunnix C++ Obfuscator as a currently available one for C++, just to give one example. Doing it in only one part of the code would just make the obfuscated part stand out.

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.