i get this is a simple problem, and i have spent almost 2 hours now looking for a fix but everything i try just creates more errors somehow. i only started learning c++ and im trying to make a simple calculator. i read somewhere about a prototype or something but im just not sure how to/able to fix this
You can either move the definitions of getValueFromUser() and yhteenLasku() above main(), or you can declare them (add prototypes) above main() and leave the definitions below main() as-is.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include <iostream>
int getValueFromUser();
int yhteenLasku();
int main()
{
// ...
}
int getValueFromUser()
{
// ...
}
int yhteenLasku()
{
// ...
}