Attempted cross-platform c++ functionality