I've been working on this issue for awhile now. I"m just looking to pass a one character value from one class to another
In my header file I have a variable declared:
extern char variable1; in class1.cpp i have the same variable declared:
char variable1 = 'N'; in class2.cpp i have the same variable declared: I don't initialize this due to the logic required for the Y/N is in class1.cpp
char variable1; My assumption on how this would work is that I would go through the logic to set it to a Y or keep it an N as initizlied in class1, once the function is finished, I would click the button on the form to go to the next class and since they all have the same name and the file name is in the header file with the keyword extern it would pass the values back and forth, is my thinking wrong? I'm still new to visual c++ so i'm just trying to learn.
winforms? Also, if you're just usingvariable1to represent a yes/no state, thenboolis probably more appropriate.