[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: (Off topic) warning: ANSI C++ forbids variable-size array `theData'
From: Juan Jose Comellas <juanjo () comellas ! org>
Date: 2001-06-25 14:59:34
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
You could use alloca() if your platform supports it.
On Sunday 24 June 2001 02:19, Ian Reinhart Geiser wrote:
> Greetings,
> I have a question on the correct way of doing things.
> I have a byte array that is a char[]. The problem is i do not know the
> length until runtime. I have always done this but C++ is not suppose to
> be this way.
>
> Currently I am doing the following:
>
> char data[blockSize]; // Is there a better way to do this....
> theFile->at(theSession->getIndex());
> int newbytesWritten = theFile->readBlock(data, blockSize);
>
> I know there is a better way to do this, but I cannot find it right now.
> Any suggestions?
>
> Thanks
> -ian reinhart geiser
- --
Juan Jose Comellas
(juanjo@comellas.org)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE7N1HW9ZfqYeM3X7ERAlkUAJ98lSY9r+NTMAzV1KGXBOi6rPKBRACfctQK
d6QMJxfxKBONIwfX3YdScjY=
=PgJz
-----END PGP SIGNATURE-----
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic