C++ : Create Same BasicIO Functions For Cross-platform Compatibility

I write a few file IO functions which are used in windows and mac os x. bool CopyAFile(const std::string inFile, const std::string outFile); bool RemoveFile(const std::string filePath); void RemoveDir(const std::string folderPath); void MoveAFile(const std::string oldFile, const std::string newFile); void CheckFolderExist(const std::string folderPath); bool FileExists( const std::string path ); void HandleLastSlash( Read more…

Add Subdirectory In CMake Project

Add subdirectories and use VTK library and Qt in my projects. The file structure looks like the following image. projectB generates lib and dll files which will be used by projectA. projectA show a window and print message from Base class in projectB. The file CMakeLists.txt in the root directionary Read more…

C++ Exercises: Data Structure II

Exercises: 232. Implement Queue using Stacks Implement a first in first out (FIFO) queue using only two stacks. The implemented queue should support all the functions of a normal queue (push, peek, pop, and empty). Solution: take advantage of the features of both stacks #include <iostream> #include <set> #include <vector> #include <algorithm> #include <stack> Read more…

3D Model Viewer: add grid plane and convex hull.
Add google translate tool at right-bottom position.

A prohibited operation