Added code for both windows and Mac.

C++ code may turn into a different language.