Skip to main content
gamedev.net
🔒 Locked

Clone an Array

Started by Prozak 1 reply 200+ views
Ecko
Ecko
memcpy( b, a, sizeof(int) * 300 );

[edited by - Ecko on December 28, 2002 6:11:51 AM]
-----------------------------------------------------------"People who usualy use the word pedantic usualy are pedantic!"-me
Fruny
Fruny
#include <algorithm>
std::copy( a, a + 300, b );


[ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | C++ FAQ Lite | Function Ptrs | CppTips Archive ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Free C++ IDE | Boost C++ Lib | MSVC6 Lib Fixes ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.