1 - Get a new compiler. There are links around for newer (free) compilers. You're going to have an unnecessary pain in the ass working with
near and
far pointers if you keep this fossile. Unless you're into that, in which case, to each their own.
2 - Globals? No need. Pass the value to the function.
3 - You have to actually prototype the function
FCFS() before you can use it. You'll have to do the same with your other functions also. The reason is, when you use them, they're not in scope. Your current function has no record of them, knows nothing about them, and as such, cannot call them correctly.
4 - You cannot do what you want:
Code:
PT[process]; /*I want this to have dimensions based on the value of variable "process" */
Want to know why? Your compiler is too old. Seriously. It doesn't understand C99, and as such, you cannot use VLAs. Update your compiler, compile
as C99, and you'll be able to.
5 - Use dynamic memory allocation if you really don't feel like upgrading your compiler. There are plenty of tutorials that will explain how. Oh wait, you don't think it's good to use sample code. Hm... I wonder how you'll ever learn anything.
Quzah.