int optellen(int x, int y)
{
return x+y; // retourneer x+y
}
int main() // main functie
{
int x,y; // 2 variabelen declareren
cout <<"2:";
cin >> x; // voer waarde x in
cout <<"\n4:";
cin >> y; // voer waarde y in
cout << optellen(x,y); // spring naar de functie optellen en
// laat de retour waarde zien
return 0;
}
Functions
Hi, i've got a problem again.
he wouldn't compile and run this:
Well...what's the problem with this one :S
EDIT: sorry guys, This the error he gives :Cout undeclared.
- Rappen.
[Edited by - rappen on May 10, 2007 8:19:37 AM]
What error does the compiler give you? If that's your full code, you're missing this:
#include <iostream>using namespace std;
Yeah sorry the error he gives is: Cout undeclared.
And i already tried with this above the whole source:
But it didn't work.
- Rappen.
And i already tried with this above the whole source:
#include <iostream>using namespace std;
But it didn't work.
- Rappen.
Quote:Original post by rappen
Yeah sorry the error he gives is: Cout undeclared.
If that's the exact error text then the problem is very likely that you've accidentally typed Cout rather than cout somewhere in your program; programming languages (well, many of them, including C++) are case sensitive.
please re-post the updated code (in a new post, don't edit the first post of the thread). Also don't give us a summary of the error in your own words, copy-paste the *actual* error.
-me
-me
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement