hi, can someone help me started with how to write a program that remove the comments from an input cpp file?
I am not even sure how to declare the function, like what would be the parameters?
and if I use
ifstream file;
file.open("text.cpp")
will the program treat that as a .text file?
Is this the right way to read the input before modified it?
void remove(int argc, char * argv[])
{
ifstream fin;
fin.open("test.cpp");
string a = *argv;
while(fin)
{
getline(fin, a);
}
fin.close();
}