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
copy string
copy string
Oct 2, 2010 at 6:05pm UTC
spsen16
(6)
Hi,
Please go through the code
//code snipet
#include <string.h>
char str[10] = "Welcome"
char str1[10] = "";
strcpy(str1,str);
How can I perform the above purely in C++ without using C string functions.strcpy is C function.
Regards,
Sanjib
Oct 2, 2010 at 6:10pm UTC
Athar
(4466)
1
2
3
4
5
#include <string>
[...] string str=
"Welcome"
; string str2; str2=str;
Topic archived. No new replies allowed.