How to get the total length of elements in ##__VA_ARGS__
-
Hi, heading says it all, how could i find out the total length of the string in the ##__VA_ARGS__ Thanks
elelont2 wrote:
heading says it all, how could i find out the total length of the string in the ##__VA_ARGS__
Subject says "elements". Your statement says "string". For a string you use null termination or the string length property (depending on what you mean by string.) In standard C++ if you want to know a count of arguments passed then you need to provide a mechanism for doing that yourself. Just like if your printf format string doesn't match the args passed then it will go off the end. Thus the format string implicitly defines the count. Not sure but in Managed C++ it might be an actual array so you should be able to get to the Length property.