system("start foo.txt"); [download]
In reply to Open txt file using default program on Windows by tanyeun