Resoved errors related to C stuff in C++