i need help for this. i made this simple program for addition. this would suppose to get two integer (x and y) from main function and pass it to the class and get the sum of it but unfortunately when i enter two digit example 2 and 2 i get the output "the sum of 4301064 and 4734484 is -214321848". what is the problem with this program and what should be the correct code for this. tnks for anyhelp.
I've just run this code without problem. I did have to comment out the #include <conio.h> line as it doesn't exist on my system. I suspect you don't need it. Also, I would reccommend #include <iostream> rather than #include <iostream.h> .
Other than that I can't see a problem.
EDIT: you need a space before 'and' and 'is' in your cout line :)