Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: yangfizz on September 23, 2012, 05:11:37 pm

Title: how come the code::blocks doesn't return any value, i can't identify what's wron
Post by: yangfizz on September 23, 2012, 05:11:37 pm
Code
#include <iostream>

using namespace std;

int function(int x);


int main()
{
    int x;
    function(x);
    return 0;
}

int function(int x)
{
    cin>>x;
    return x
}

after i input the value, i was supposed to get the value because of return, but for some reason, it doesn't return anything at all.
Title: Re: how come the code::blocks doesn't return any value, i can't identify what's wron
Post by: Ceniza on September 23, 2012, 05:25:32 pm
Code::Blocks is NOT a compiler, and we are NOT a general programming forum. Did you read the rules when you registered?