I made a class in a .cpp and a .h file with in the same project, and then I tried to make a calculating code. I made an object for it, with the name "co". I then tried to build it and run the file, and it showed nothing. Why is that happening and how can I try to fix it? The code:
main.cpp
#include <iostream>
#include <fstream>
#include <string>
#include "CalculatorClass.h"
using namespace std;
int main()
{
calculatorClass co ();
}
calculatorClass.cpp
#include "calculatorClass.h"
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
calculatorClass :: calculatorClass ()
{
int x = 25;
int y = 37;
int z = 51;
int a = 14;
int b = 63;
int c = 75;
cout << x * y * z * a * b * c ;
}
calculatorClass.h
#ifndef CALCULATORCLASS_H
#define CALCULATORCLASS_H
class calculatorClass
{
public:
calculatorClass (int hello);
calculatorClass();
protected:
private:
};
#endif // CALCULATORCLASS_H
Thanks!