First, search the web and Stack Overflow for the keywords "parsing" and "file". To narrow your search, add the keywords "mac address c++".
Next, prefer to read data into memory than process memory. In other words, read a line of text into a string and use methods of std::string
for finding items in the text.
Research std::stringstream
for ways to convert textual representations of numbers to their internal representations.
Try something on your own. If you have issues, post the smallest amount of code to recreate the issue along with the compiler output as well as what you expect the program to produce.