Hi there. I'm practising calculators, and I have trouble to make it work every time. The second code I inserted here to show you, works fine. But not the code above. And they seem like the same? I get the message: "skapatal1" and "skapatal2" was not declared in the scope.. what? it works just fine in the other code... would be so happy to be able to understand what I'm doing wrong.
int minfunktionmulti (tal1, tal2)
{
return tal1 * tal2;
}
int main ()
{
int skapatal;
int skapatal2;
cout << "skriv in ett tal tack" << endl;
cin >> skapatal;
cout << "and another one pls" << endl;
cin >> skapatal2;
cout << "detta er summan" << minfunktionmulti (tal1, tal2) << endl;
1. In the declaration of minfunktionmulti paraemeters; types were not specified.
2. In main variables ral1 and tal2 were not defined. So the call
regarding 2. I thought I shouldn't have to define the variables tal1 and tal2 in main because they are paraemeters. Can't I write any letters in the paraemeters?
I saw this tutorial and the guy had different letters in the paraemeters and in the argument. Or is that another way to do it?