I think i found a easy solution!
cpp -P yourcommentedfile.txt 
SOME UPDATES:
Quote from the user ilkachu (original text from the user comments):
I played a bit with the options for gcc: -fpreprocessed will disable most directives and macro expansions (except #define and #undef apparently). Adding -dD will leave defines in too; and std=c89 can be used to ignore new style // comments. Even with them, cpp replaces comments with spaces (instead of removing them), and collapses spaces and empty lines.
But iI think it is still reasonable and a easy solution for the most of the cases, if you disable the macro expansion and other things iI think you will get good results... - and yes you can combine that with shell script for getting better... and much more...
I am personally using cpp -P (without any other parameter) for removing comments from php files without any problem for years - but maybe you will not have that lucky... so consider your problem with care and it should do good.
If that is not enough for you, try stripcmt - a comment remover: http://www.bdc.cx/software/stripcmt/
 
                