Author Topic: how come the code::blocks doesn't return any value, i can't identify what's wron  (Read 1838 times)

yangfizz

  • Guest
Code: [Select]
#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.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Code::Blocks is NOT a compiler, and we are NOT a general programming forum. Did you read the rules when you registered?