cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Taking only part of a char array?
Taking only part of a char array?
Jul 22, 2008 at 12:41pm UTC
ForeverYoung
(2)
Let's say we have a char array test[10], and it contains "123456789"
What should I do if I want to get only the first 5 characters and put it into another character array?
Jul 22, 2008 at 1:38pm UTC
elpis
(32)
Use
strncpy
http://www.cplusplus.com/reference/clibrary/cstring/strncpy.html
Topic archived. No new replies allowed.