Re: C++: Is there a Value used to designate the end-of-an-array for non-char arrays?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Robert,

Unless you're dealing with legacy code, then with C++ std::vector or or std::list are the way to go. These container classes come with end() methods which allow you to detect when you've reached the end of the container. Even if you are dealing with legacy code, it is possible to pass vectors as arrays in most cases, althougth this would probably require more code changes than you want.

HTH,
David.

Robert Miesen wrote:

Hi.

I am curious if there is any sort of value used to designate the end of an array for arrays that are not of type char. I checked the book, "The C Programming Language", the book, "C++: The Complete Reference, 4th ed.", and briefly checked and found no information on the value used to designate the end of a non-character array.

Does such an end-of-array value exist for arrays that are not character arrays? Thank you for your responses in advance





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux