E D R , A S I H C RSS

05학번

~cpp
#include <cstdlib>
#include <iostream>

using namespace std;

 

void copy(char *src, char *dest, int length )
{
	
	for(size_t i(0);i<length; i++ )
	{
		dest[i] = src[i];
	}
	

}

 

int main () 

{

             //char *p = malloc(sizeof(char)*100);
			char *p = new char[30];

            copy("my_string", p, 30 );
		

            delete [] p;

			 return 0;

}
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:22:04
Processing time 0.0107 sec