can't find error

Where could the error be? I realize this is a small segment of the code but I can't figure out what to do. It says the '.' needs an expected initializer, but I don't know where to put it.

void remove_duplicate()//this function removes the duplicate IDs

{
ifstream myfile.open("counted.txt");
closed account (oGN8b7Xj)
Hmmm... A semi-colon is missing?
change it to simply:
 
    ifstream myfile("counted.txt"); 



well, this is also valid, but there's no benefit in doing so here:
1
2
    ifstream myfile; 
    myfile.open("counted.txt"); 


Thanks Chervil!
Topic archived. No new replies allowed.