Comment taking.

Hi there, I'm trying to write a c++ program in visual basic 6.0 that will take the comments from an arbitrary file (c or c++) and put in a text file. Now... I know that I need to define string line and the string content and that I need to work with fstream , but I just don't know how to write the goddamn program. I know that a lot of you will find begging someone to do your work for you extremely disrespectful, but I'm in a corner right now and I need all the help I can get. If anyone has done this kinda program before, please give it to me even though I don't deserve it.
Last edited on
Let's reduce the problem.
Take only the comments in the form //this is a comment and just to the end of line.

So simply read a line and find the "//" substring.

There if program for deleting comments from file directed to stdin I wrote in C many years ago. You can look how I did comment detection:
Last edited on
Topic archived. No new replies allowed.