|
-
February 9th, 2010, 12:34 PM
#3
Re: How to get lenght of a float* variable
There is no way to query the length of a raw array once it has decayed to a pointer (or if it was dynamically allocated to begin with). You need to either a) make the length an explicitly queryable value, or b) use a class which wraps the array and stores the length internally. std::vector and std::tr1::array are two such classes that are commonly used.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|