Hi all.
Today I write a little program which read data per one byte to buf1 and must (in loop) adding per one byte to buf2:
--cut---------------------
char buf1[1];
int size=0;
char *buf2=new char[size]; //

?
main()
{
while(recv(sockfd,buf1,sizeof(buf1),0)
{
memcpy(buf2+size,buf1,sizeof(buf1));
size++
};
printf("%s\n",buf2);
};
--cut---------------------
I mean buf2 size is unknown, and must change. On win32 (bcc compiler), this kind of strings:
int size=0;
char *buf2=new char[size];
give me all what i need, but on amiga (sasc):
==================
char *buf2=new char[size];
file.c 37 error 9: Undifined identifier "new"
==================
char *buf2=new char[size];
file.c 37 error 57: semi-colon expected
==================
char *buf2=new char[size];
file.c 37 error 77: identifier expected
So, any help will be very good. Or how i can fix identifier, or maybe any other way for solve this problem. Thnx