Depending on how you will be using the file, the simplest choice is probably to write the int as raw (not text, not formatted) data in the file
Code:
FtpWrite( (void*)(&size), sizeof(size) , whatever );
BTW, a programmer of my experience level ought to remember which of C vs. C++ or both and under what conditions, you could write simply
&size where a
void* is needed and the compiler will cast implicitly. I intentionally don't memorize such details, because I think this kind of code is more maintainable if you explicitly code
(void*)(&size) even if the compiler would have understood less.