Name: Anonymous 2008-02-13 11:24
Hi.
I'm attending a C++ programming course. The teacher gave us some exercises, in which we must find what's wrong with the code.
The problem is I'm completly stuck in one of them. I tried to create and compile the following code:
The problem is the compiler gives no errors and the program runs without any errors either.
Could someone PLEASE help me?
Thx in advance.
I'm attending a C++ programming course. The teacher gave us some exercises, in which we must find what's wrong with the code.
The problem is I'm completly stuck in one of them. I tried to create and compile the following code:
#include<iostream>
using namespace std;
int my_sum(int a, int b)
{
int c;
c=a+b;
}
void main()
{
cout << "2 + 3 = " << my_sum(2,3) << endl;
}The problem is the compiler gives no errors and the program runs without any errors either.
Could someone PLEASE help me?
Thx in advance.