I been using functions in my learnings so the error is some what confusing me.
I get:
error C2660: 'test' : function does not take 0 arguments
error C2562: 'test' : 'void' function returning a value
I got my script from copying a tutorial and they used the same structure except i went a bit further and added two values together - assign that a variable then to try to return the value of that variable. But i've gone wrong some where. And no doubt its probably some thing obvious but i cannot see it.
#include <iostream>void test(int, int);int main(){ test(5,8); std::cout << "The answer is: " << test() << std::endl;}void test(int iValue1,int iValue2){ int iSum; iSum = iValue1 + iValue2; return iSum;}
[Edited by - thefollower on August 24, 2010 6:50:59 PM]