Hi there, been working on a small program that will loop a function which adds two integers until the user enters 00, but can't seem to work out the finer details. A little newer to C++, don't need a complete answer but any advice would be much appreciated
#include<iostream>
using namespace std;
int main ()
{
double x, y ;
cout << "Welcome to the Functions Program! To quit enter 00." << endl ;
cout << "Input two numbers." << endl ;
cin >> x, y ;
while (x || y != 00) ;
{
int z ;
z = (x,y);
cout << "The result is " << z;
return 0 ;
}
int (int x, int y) ;
{
int r; r=x+y;
return (r);
}
}
And i'm pulling in these errors;
documents\visual studio 2008\projects\functions\functions\source.cpp(19) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
c:\documents and settings\owner\my documents\visual studio 2008\projects\functions\functions\source.cpp(26) : error C2144: syntax error : 'int' should be preceded by ')'
c:\documents and settings\owner\my documents\visual studio 2008\projects\functions\functions\source.cpp(26) : error C2059: syntax error : ')'
c:\documents and settings\owner\my documents\visual studio 2008\projects\functions\functions\source.cpp(28) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data