Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ Exercise

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:
#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.

Name: Anonymous 2008-02-13 19:24

>>28
I never knew what was -O3.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List