*.cpp *.h: vim settings for 2-spaces instead of tabs
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
06b00b9f97
commit
768916ff0d
3 changed files with 39 additions and 34 deletions
|
@ -1,14 +1,12 @@
|
|||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
#include "account.h"
|
||||
|
||||
Account::Account ( double initial_balance ) : balance(initial_balance) {
|
||||
}
|
||||
|
||||
Account::~Account () {
|
||||
cout << "account deleted" << endl;
|
||||
std::cout << "account deleted" << std::endl;
|
||||
}
|
||||
|
||||
double Account::getBalance() const {
|
||||
|
@ -22,3 +20,5 @@ void Account::deposit(double amount) {
|
|||
void Account::withdraw(double amount) {
|
||||
balance -= amount;
|
||||
}
|
||||
|
||||
// vim:set sts=2 sw=2 et:
|
||||
|
|
|
@ -42,3 +42,5 @@ class Account
|
|||
}; /* ----- end of class Account ----- */
|
||||
|
||||
#endif
|
||||
|
||||
// vim:set sts=2 sw=2 et:
|
||||
|
|
11
main.cpp
11
main.cpp
|
@ -3,15 +3,15 @@
|
|||
*
|
||||
* Filename: main.cpp
|
||||
*
|
||||
* Description:
|
||||
* Description: learning C++ [again]
|
||||
*
|
||||
* Version: 1.0
|
||||
* Created: 02/08/2025 11:05:02 AM
|
||||
* Revision: none
|
||||
* Compiler: gcc
|
||||
* Compiler: g++
|
||||
*
|
||||
* Author: YOUR NAME (),
|
||||
* Organization:
|
||||
* Author: Vincent Batts (vbatts@hashbangbash.com)
|
||||
* Organization: HashBangBash
|
||||
*
|
||||
* =====================================================================================
|
||||
*/
|
||||
|
@ -25,9 +25,12 @@ using namespace std;
|
|||
|
||||
int main(int argc, char* argv[]) {
|
||||
Account account(0.0);
|
||||
|
||||
account.deposit(100.5); // Add some money
|
||||
account.deposit(50.25); // Add more money
|
||||
std::cout << "Current Balance: " << account.getBalance() << std::endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
// vim:set sts=2 sw=2 et:
|
||||
|
|
Loading…
Add table
Reference in a new issue