S
Sreeram
Hi,
I have a class in which I have member variables for "timeb" structure. I
want to overload the operator == for the class. I want to check whether
2 structure variables are equal. How should I check whether 2 structure
variables are equal?
Please anybody could help.. I am pasting a small simple C++ code.
#include <string>
#include <vector>
#include <iostream>
#include <sys/timeb.h>
using namespace std;
int main()
{
timeb a, b;
// some code
vector<timeb> vecTime;
vecTime.push_back(a);
vecTime.push_back(b);
if (vecTime[0] == vecTime[1])
cout << "Equal";
else
cout << "Not equal";
return(0);
}
I have a class in which I have member variables for "timeb" structure. I
want to overload the operator == for the class. I want to check whether
2 structure variables are equal. How should I check whether 2 structure
variables are equal?
Please anybody could help.. I am pasting a small simple C++ code.
#include <string>
#include <vector>
#include <iostream>
#include <sys/timeb.h>
using namespace std;
int main()
{
timeb a, b;
// some code
vector<timeb> vecTime;
vecTime.push_back(a);
vecTime.push_back(b);
if (vecTime[0] == vecTime[1])
cout << "Equal";
else
cout << "Not equal";
return(0);
}