Makes sense once you explain it I saw the {...} and thought he was using something to do with C++ capabilities to unlimited (not really) number of paramters. I was thinking too complicatedly. hehehehe duh! simply overloading. sheesh got it! don't know that that is any cleaner than just having a global empty vetor except I suppose someone could actually use it or assign some values or something, where with the overload, it couldn't happen. B-) On Friday 11 February 2005 02:01 pm, Jerry Feldman wrote:
I think that Davi's solution is relatively portable. In C++, you can have multiple signatures: 1. func() -- Empty parameter list. It simply defines the vector and then calls the other function in the same class. Probably does not need to use this->. 2. func(vector<uint> &foo) -- This is the function that does something with the vector. Because you are calling by reference, I think you must have a vector to reference. Borland may have some non-standard extensions where GCC tends to be a crybaby sometimes.
In this case, your code would probably be more portable. You might also want to make func() inline.
-- Jerry Feldman <gaf@blu.org> Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9