DerStrom8
Super Moderator
but i wonder, how does it know which variable to use (int,int,int,int) <--these values go in to CSA,SECTOR,BLOCK,PAGE, but how does it know to go to the right variable?
That is why I prefer to use the method I described earlier to set up and call the functions. It is much easier to understand. Your prototype would set up the value types and the code for that function in the prototype. That way, when you're in main and want to call the function, you only need to type the function name and put in the right values. I.E. int myFunction(int, int, int, int), and call it later by saying myFunction(CSA,SECTOR,BLOCK,PAGE); That way, you can pass the variables up into the function, and have it execute the code up there, and then come back down to main.