Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I have 16 years' experience programming in C++ <

Well, there you go; this is absolutely not idiomatic C++; in C++ (or even in application-level C code) one would (correctly) use language features or a library call to perform this copy.

I should have been more specific; this code is completely idiomatic for standard-library-level C (though standard libraries will generally use more sophisticated copy implementations). If one is fluent in that particular dialect of the C language, then this construct is natural and correct.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: