스트링 중 원하는 부분을 replace하는 함수를 짜려고 합니다.
버퍼를 할당하여 거기에 저장해서 리턴하려고 하는데...
도대체 버퍼 사이즈를 어떻게 정하죠?
[code:1]char* replaceStr(char* strSrc,const char* strFrom, const char* strTo, int sizeofStrSrc = 5000 )
{
char* strBuf = new char[sizeofStrSrc]; // -->> 이부분!!
char* curFrom = strSrc;
char* curTo = strSrc;
bzero(strBuf, sizeofStr);
if(curTo = strstr(curFrom, strFrom))
{
while(curTo)