Re: Variable array size allocation
- From: "boki" <bokiteam@xxxxxxxxxxxxxx>
- Date: Tue, 17 May 2005 20:22:19 +0800
C++ ok, C fail..... ><!!
Compiling...
test.c
\test.c(10) : error C2065: 'new' : undeclared identifier
\test.c(10) : warning C4047: 'initializing' : 'char *' differs in levels of
indirection from 'int '
\test.c(10) : error C2143: syntax error : missing ';' before 'type'
\test.c(10) : error C2143: syntax error : missing ';' before '['
\test.c(10) : warning C4091: ' ' : ignored on left of 'char ' when no
variable is declared
Error executing cl.exe.
"Nishant Sivakumar" <nish@xxxxxxxxxxxxxxxxxxxxxxx> ¼¶¼g©ó¶l¥ó·s»D:Oqbo1ntWFHA.2684@xxxxxxxxxxxxxxxxxxxxxxx
> Something like :-
>
> char* pData = new char[size];
>
> Note that you cannot do :- char Data[size]
>
> --
> Regards,
> Nish [VC++ MVP]
> http://www.voidnish.com
> http://blog.voidnish.com
>
>
> "boki" <bokiteam@xxxxxxxxxxxxxx> wrote in message
> news:OeRB88rWFHA.3864@xxxxxxxxxxxxxxxxxxxxxxx
>> Hi All,
>>
>> I need to declare variable array size.
>>
>> I will receive data, but I can't sure the data length.
>>
>> I need a array to save it.
>>
>> Best regards,
>> Boki.
>>
>>
>
>
.
- Follow-Ups:
- Re: Variable array size allocation
- From: adebaene
- Re: Variable array size allocation
- References:
- Variable array size allocation
- From: boki
- Re: Variable array size allocation
- From: Nishant Sivakumar
- Variable array size allocation
- Prev by Date: Re: Variable array size allocation
- Next by Date: Re: about OOP: how does a class in container know container's information?
- Previous by thread: Re: Variable array size allocation
- Next by thread: Re: Variable array size allocation
- Index(es):
Relevant Pages
|