Hi, i am new at programming and i am working in a hw were i need 3 files.
I need one file.h, file.cpp, fileMain.cpp . I need to find the average of some grades but i dont know where to ask the user for the grades. Will it be at the file.cpp or fileMain.cpp? or both?
Hi,
Generally the file.h shows the function prototypes (names and parameters - declaration only), the file.cpp has all the function definitions (all the instructions inside the functions), and the fileMain.cpp will have all the function calls.
If you have to create a function to do this, you will ask the user from inside the function definitions (file.cpp). Or you can ask the user in fileMain.cpp and the call the function to do the calculations only.