Well you probably accidentally changed the extension association for .cpp to notepad somehow. Try right clicking a .cpp file, right clicking and open with select your program from a list and choose to remember it.