Translating C code to C++

Finished transtion for OS folder
Added StrNCpy method to CString
Fixed errors in cge_memory.cpp