I\'m learning threading and I\'ve found some simple examples.
What I\'m hoping to do is create 5 threads, that each assign a random number to an array of 20 int\'s.
The other answers cover the main points: there's another one that is often an issue (at least on LINUX: not sure about windows)
int array1[1000000]; int array2[1000000];
Declaring very large arrays as local variables runs the danger of overflowing your stack space, thus crashing your program.