I understand that C++ requires both a .h and a .cpp file.
.h file is for declaration while .cpp is where we insert all our functions.
I have written a .h file but is unable to compile using visual C++ and can some1 point out to me if my constructor is correct.
I have furthermore included options for my constructor. Please advise me on which one should i use as i see different coding types in books.
#ifndef Testing_H
#define Testing_H
class Testing {
public:
Testing(); / Testing(float H, float A);
void Test_H();
float Test_H (float A); / float Test_H (float);
float Test_Give (float A); / float Test_Give (float);
private:
float H; // I am initialising all values of H and A in .cpp file
float A;
};
#endif
can someone please give comments on it.
Thanks
New Self-learn kid