I have tried the CLASS::enum member way of reference, to no success.
The problem is trying to pass a variable(the enum member) without hardcoding the
enum member name.
If any one has a hint.
Thanks
Don Head
Bore
March 30th, 1999, 10:38 AM
I'd be interested to see your actual code, as I don't see anything wrong with what you're doing. I do this all the time. But I'm confused by your statement, "...without hardcoding the enum member name." Do you really mean, "...without hardcoding a literal number?" If you don't want to type the enum member *name*, then I'm confused.
the ContractType is calculated out, and this enum value is passed to the DumpContract
method. It will not be possible to hardcode the 'UpLoader::TempAssign' parameter.
This,I assume it would have to be a variable of some type.
I hope this clears up the question
Thanks
Don
Bore
March 30th, 1999, 11:42 AM
Sorry, I didn't mean this when I said, "actual code." I meant something that would supply a context. But better yet, how about saying what's wrong? I mean, you say that you do this "to no success." What's failing? Compiler error? Incorrect results?
Wait--do you mean you want to pass a variable to DumpContract() that indicates the contract type? If that's the case, then you'll need a field in your contract object that indicates the contract type. You can then pass that field into DumpContract(). Does this help at all?
Jim McCreary
March 30th, 1999, 11:53 AM
The declaration for DumpContract would be something like:
int DumpContract(int jobid, int code, enum ContractType type, .....
or the enum isn't really necessary but you might need:
int DumpContract(int jobid, int code, UpLoader::type, .....
Is this what you were looking for?
Don Head
March 30th, 1999, 02:33 PM
Here is some more code & the error message when compiled.
The caller will calculate the ContractCategoryType(based on various other fields)