tmp.c/main.cpp
2025-02-10 17:15:32 -05:00

60 lines
1.3 KiB
C++

// Copyright 2025 Vincent Batts <vbatts@hashbangbash.com>
/*
* =====================================================================================
*
* Filename: main.cpp
*
* Description: learning C++ [again]
*
* Version: 1.0
* Created: 02/08/2025 11:05:02 AM
* Revision: none
* Compiler: g++
*
* Author: Vincent Batts (vbatts@hashbangbash.com)
* Organization: HashBangBash
*
* =====================================================================================
*/
#include <iostream>
#include <cmath>
#include <cstdlib>
#include "./common.h"
#include "./account.h"
#include "./worker.h"
Account* do_account() {
Account* account = new Account(0.0);
account->deposit(100.5); // Add some money
account->deposit(50.25); // Add more money
log_out("Current Balance: " << account->getBalance());
return account;
}
void scoped_account() {
log_out("HERE");
auto account = do_account();
log_out("HERE");
account->withdraw(100);
log_out("Current Balance: " << account->getBalance());
log_err("dang");
}
int main(int argc, char* argv[]) {
int ret;
scoped_account();
Dang::Worker worker;
ret = worker.work();
if (ret != 0) {
std::cout << "worker failed" << std::endl;
}
return EXIT_SUCCESS;
}
// vim:set sts=2 sw=2 et: