Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

C++

Name: noob 2013-04-08 20:32

how 2 copy from string to char[] in c++??

Name: Anonymous 2013-04-08 20:50

Assuming the char array is larger than the string, strcpy(char* destination, const char* source)

Name: Anonymous 2013-04-08 20:52

thanks g

Name: Anonymous 2013-04-08 20:53

Also, more info + good documentation: http://en.cppreference.com/w/cpp/string/byte/strcpy

Name: Anonymous 2013-04-08 21:00

nah readin ain't my style bro

Name: Anonymous 2013-04-08 21:05

>>1,3,5
I love you! I love your posts! I read them 5 times! Keep posting!

Name: Anonymous 2013-04-08 21:08

thanks bro i jus dnno how to rd good

Name: Anonymous 2013-04-08 21:15

lol u tk him 2da bar|?

Name: Anonymous 2013-04-08 21:18

shutup fgt

Name: Anonymous 2013-04-08 22:24

strcpy() is for virgins.
Real men use memcpy().

Name: Anonymous 2013-04-08 22:30

>>10
Have you even used strcpy before?

Name: Anonymous 2013-04-09 1:51

string lel = "lel"; char * nigger = malloc(lel.length() + 1); memcpy(nigger, lel, lel.length() + 1);

Name: Anonymous 2013-04-09 3:13

I limit my strings to 8 characters. Then I can just do mov rbx, rax to copy string. As a bonus, it's also quite a bit faster.

Name: Anonymous 2013-04-09 3:27

>>12
What if I need to use a string other than "lel"?

Don't change these.
Name: Email:
Entire Thread Thread List