I have this code, but when I compile it with Borland Turbo C++, Turbo C++ say:
Error filename.cpp 13: Call of nonfunction in function main()
my code is:
#include <iostream.h>
int reload (int yes, int no) {
int reload;
cout << yes << no;
cin >> reload;
return reload;
}
main () {
int a, reload = 1;
while (reload == 1) {
reload (1,0);
cout << "Enter a number: ";
cin >> a;
}
return 0;
}
You named a variable
reloadwhich hides thereload()function. The compiler thinks you are trying to “call” theint reloadvariable, thus “call of nonfunction”.Rename either the function or the variable.