Watch, Follow, &
Connect with Us

Welcome, Guest
Guest Settings
Help

Thread: Declare global variable at runtime



Permlink Replies: 0 Threads: [ Previous | Next ]
Digby Millikan

Posts: 30
Registered: 7/6/03
Declare global variable at runtime
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 21, 2016 11:31 PM
How can a global variable be declared at runtime.

e.g.

code....
....
myfunction(); <-- when I call myfunction the scope of the variable
is local to the function, not global, how can I declare array1 global
at runtime ?
....
code ... uses array1
....

void myfunction(){

int array1[10][10];

}

Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02