Hey,
I am an extreme newbie and when I run my code after compiling it, the cmd just flashes and closes. Now, I know that it is flashing because I haven't paused it but using script like getch() that is prior to return; will not work for me as this will stop the script all too soon. So far this is my code:
#include <iostream>
using namespace std;
int change(int,int,int);
int main() {
int x =34, y=45, z=67, sum = 0;
sum = change(x,y,z);
cout << sum << endl;
return 0;
}
int change(int x, int y, int z){
int sum;
cout << x << " " << y << " " << z << endl;
sum = (x+y+z);
return sum;
}
At the moment I am using Dev C++ 4.9.9.2 .