This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Obj | |
{ | |
accessor(char) | |
{ | |
get { | |
std::cout << "get: " << value << std::endl; | |
} | |
set { | |
std::cout << "set: " << value << std::endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct object | |
{ | |
int attr; | |
// disable the object construction outside of the singleton | |
private: | |
object() {} | |
friend singleton<object>; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cassert> | |
template <typename T> | |
struct proxy | |
{ | |
const T& value; | |
bool previous; | |
proxy(const T& value, bool previous) : value(value), previous(previous) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ----------------------------------------------------------------------------- | |
// SavingsAccount.cpp | |
// ----------------------------------------------------------------------------- | |
#include <iostream> | |
using std::endl; | |
#include <cassert> | |
#include "utils.h" | |
#include "SavingsAccount.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using std::istream; | |
using std::ostream; | |
using std::cout; | |
using std::cin; | |
using std::endl; | |
#include <sstream> | |
using std::stringstream; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cassert> | |
#include <cmath> | |
#include <string> | |
using std::string; | |
#include <iostream> | |
using std::ostream; | |
using std::endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Vending Machine Project | |
* CSE-40477 | |
* | |
* Coin.cpp | |
* YOU MUST IMPLEMENT THE FUNCTIONS IN THIS FILE. | |
*/ | |
#include "Coin.h" | |
using Project1::Coin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <ostream> | |
using std::ostream; | |
#include <stdexcept> | |
using std::invalid_argument; | |
#include <string> | |
using std::string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using std::cout; | |
using std::endl; | |
using std::ostream; | |
#include <string> | |
using std::string; | |
#include <vector> | |
using std::vector; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
using std::string; | |
#include <iostream> | |
using std::istream; | |
using std::ostream; | |
#include <sstream> | |
using std::stringstream; |
OlderNewer