Last active
December 26, 2019 14:40
-
-
Save kazmura11/13067c4b2833303c642b to your computer and use it in GitHub Desktop.
dll sample Bmi.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
#pragma once | |
#ifdef BMIDLL | |
#define BMIDLL_API __declspec(dllexport) | |
#else | |
#define BMIDLL_API __declspec(dllimport) | |
#endif | |
#include <string> | |
namespace MyUtil | |
{ | |
const double BmiBoundLow = 18.5; | |
const double BmiBoundNormal = 25.0; | |
const double BmiBoundHighLv1 = 30.0; | |
const double BmiBoundHighLv2 = 35.0; | |
const double BmiBoundHighLv3 = 40.0; | |
class BMIDLL_API Bmi | |
{ | |
public: | |
Bmi(const std::string name, const double height, const double weight); | |
std::string calc(); | |
std::string getName(); | |
double getBmi(); | |
~Bmi() {}; | |
private: | |
Bmi(); // デフォルトコンストラクタ封印 | |
std::string name_; | |
double height_; | |
double weight_; | |
double bmi_; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment