Sed script, changing all C-comments to C++-comments

I must write a script to change all C++ like comments:

// this is a comment 

to this one

/* this is a comment */

How to do it by sed? With file:

#include <cstdio>
using namespace std; //one

// two
int main() {
  printf("Example"); //    three
}//four

the result should be:

#include <cstdio>
using namespace std; /*one*/

/* two*/
int main() {
  printf("Example"); /*    three*/
}/*four*/

I don't know how to append */ on the end of line. Can anyone help me?

Best regards,
Lucas

Try:

# sed "s@//\(.*\)@/*\1*/@g" file1  
#include <cstdio>
using namespace std; /*one*/

/* two*/
int main() {
  printf("Example"); /*    three*/
}/*four*/

Of course, this doesn't cater for when there are // inside strings...

Great, thanks a lot. I haven't any // in strings, so it works.