Can you ignore lines in a txt file? ifstream

Is there a way i can "comment out" lines in a txt file that im reading data from? The actual prefix im looking for to decide wheather or not to ignore the line dosent really matter, just thought comment's would be the best example. So kinda like- (yes im sure this is wrong, its just an example)
Code