Hi, I've written this simple program but it doesn't run. it doesn't show error but after build and run only shows "exited with code 0" instead of some strings whixh i've written in main body.
PHP Code:#ifndef mainwindow_H
#define mainwindow_H
class mainwindow
{
private:
double a;
double b;
public:
mainwindow()
{
a = 0.0;
b = 0.0;
}
mainwindow(double x, double y)
{
a = x;
b = y;
}
void setA(double x)
{
a = x;
}
void setB(double y)
{
b = y;
}
double getA()
{
return a;
}
double getB()
{
return b;
}
void add(double x, double y)
{
a = x + y;
}
void sub(double x, double y)
{
a = x - y;
}
void mul(double x, double y)
{
a = x * y;
}
void div(double x, double y)
{
a = x / y;
}
};
#endif
PHP Code:#include <iostream>
#include "mainwindow.h"
int main()
{
std::cout << "Program starts. . ." << std::endl;
mainwindow test1;
mainwindow test2(0.666, 0.875);
std::cout << "A = " << test1.getA() << std::endl;
std::cout << "B = " << test2.getB() << std::endl;
test1.setB(test2.getB());
test2.setA(test1.getA());
std::cout << "A = " << test1.getA() << std::endl;
std::cout << "B = " << test2.getB() << std::endl;
return 0;
}



