How can I reinitialize all the values in the structure object below?
You can't reinitialise anything. You can initialise it or you can
assign to it.
This structure object (myTest) is common to several subprograms in a
larger program, and when I engage any of the subprograms I want to
assure that the structure is (re)initialized to the zero value I've
defined in its declaration.
Huh? What do you mean? Assign an empty struct to it
void foo(TestStructure&rTest) {
...
rTest = TestStructure();
...
Not sure that can work, as several different subprograms need to
access the same data throughout their processing. I require that the
structure object be global data (I know, that's frowned upon, but that's
how I do it...), so passing referencing and having instantiated
object(s) doesn't do what I want.
I'm just looking for a simple way to clear a structure (of common
counters) each time I engage various functions in a menu-driven program.
Sloppy and somewhat kludgey, but that's how it is... 8<{{