cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
char * to char array
char * to char array
May 6, 2010 at 10:51pm UTC
newToItAll
(3)
Hello all, i'm kind of new to c++ and need some help.
ok, so I have a function that returns a char pointer.
I want to copy the array of chars that it points to into another array
can you show me the code needed to do this, thx :)
Last edited on
May 6, 2010 at 10:57pm UTC
May 7, 2010 at 12:07am UTC
Zhuge
(4664)
Try this:
http://www.cplusplus.com/reference/clibrary/cstring/memcpy/
May 7, 2010 at 12:20am UTC
newToItAll
(3)
is there any other way to do, without using a function?
May 7, 2010 at 1:51am UTC
firedraco
(6243)
Use a for loop.
Topic archived. No new replies allowed.