0

I am familiar with objective-c to copy file using cocoatouch sdk. But I hope add copy file function to my game (cocos2dx c++).

Is there a common way for ios and android to copy file using c++?

Your comment welcome

arachide
  • 8,006
  • 18
  • 71
  • 134

1 Answers1

0
int main()
{
    std::ifstream  src("from.ogv", std::ios::binary);
    std::ofstream  dst("to.ogv",   std::ios::binary);

    dst << src.rdbuf();
}

Taken from here.

Of course in Android you need NDK for that.

Community
  • 1
  • 1
HyBRiD
  • 688
  • 4
  • 23