See it yourself :
void LoginScreen(){
//you still want to use addUser from main, so what is this ?
UserInfo addUser[100]; -----------+
... |
} |
|
void main() |
{ |
|
UserInfo addUser[100]; ------------+
...
}
You can do something like this :
void LoginScreen(UserInfo addUser[] ){ ... }
Obviously you need to remove UserInfo addUser[100];
from LoginScreen
too
and then call it from main
LoginScreen(addUser) ;
Also, void main
is not legal c++ use int main
0
solved Object not calling the value [closed]