[Dev-C++] How to get the number of elements in an array
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Daniel G. <sp...@ho...> - 2004-01-20 10:50:01
|
This is an easy Q I know but I can't think how to do it... Size = 9; // Decided by a function but set to 9 for this example int* Buf = new int[Size]; int Tmp = sizeof(Buf); This can't be right. How do I get the size? Len(Buf) and Length(Buf) are not recognised (I thought they were functions but I guess not). Any thoughts? _________________________________________________________________ Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger |