Function not returning value
I think I'm missing something about passing variables to functions. This small program doesn't do what I want it to do. Its suppose to print a = 0 then call the function then print a=5, but it prints a=0 both times... what am I missing?
Code:
#include <iostream>
using namespace std;
int blabla(int b);
int main()
{
int a=0;
cout<<"a = "<<a<<" before function call."<<endl;
blabla(a);
cout<<"a = "<<a<<" after function call."<<endl;
}
int blabla(int b);
{
b=5;
return b;
}