func(int var)//Constants can not be changed so to attempt to will create some sort of error or compiler problem. Remove the const.
{var++;
return var;}//return is necessary
int main()
{int x;//I am a noob at c++ so I'm not sure if you can declare and assign a variable at the same time in this language. To be safe I split it into 2 steps.
x=10;
x=func(x);//you need to use the func return somewhere
cout<<x;
return 0;}// Again return is necessary. Also without any method of pausing before the return it will immediately close the program so you won't get to see the output.
[code]<The way to create a code box is to use these>[/code]
program
creates x
assigns 10 to x
sends x to the fun
increases var by 1
returns variable
assigns funct return to x
outputs x
ends program