i have that c++ project. i want to get today's date to compare it with a saved date in my files. i already searched but all i found is i can output it on the console but that isn't what i want. is it possible?
#include <iostream>
#include <cmath>
#include <string>
#include <chrono>
#include <ctime>
using namespace std;
static double interset = .05;
class Account{
public:
string ID;
double Balance;
void Deposit(double bal){
Balance += bal;
}
void Withdraw(double bal){
if (bal > Balance){
cout << "Please check the entered amount" << endl;
}
else{
Balance -= bal;
}
}
void BalanceInqu(){
cout << "Your Current Balance Is\t" << Balance << endl;
}
};
class SavingAccount : public Account{
public:
void intersetRate(){
\\i want to put here a function that calculates the interest rate of an client depending on his account creation date
}
};
Edit: i want to get the date to store it into variable and compare it with other dates