Why does this result in an error



1
2
3
4
  void example (int x)
{
	x=x+1;
}


Why would the following result in an error?

 
cout<<example(7);


NOTE: assume the call is part of a program where everything else is correct. In other words, the error is confined to the code shown here.
Your function return type is void that means it dont return anything
Topic archived. No new replies allowed.