Skip to content

Instantly share code, notes, and snippets.

@kazmura11
Last active December 26, 2019 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kazmura11/13067c4b2833303c642b to your computer and use it in GitHub Desktop.
Save kazmura11/13067c4b2833303c642b to your computer and use it in GitHub Desktop.
dll sample Bmi.h
#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