📄 stock.h
字号:
class Stock
{
protected:
long stkCode;
char stkName[10];
double stkOriPrice; //开盘价
double stkPrice; //当前价
long stkIss;
double stkRange; //需改名 //形如1.23
//char *stkRange;
int stkRank;
public:
Stock operator ()(char *fileName);
Stock(long stkCode1=0, char stkName1[10]="xxxx", long stkIss1=0, double stkOriPrice1=0,
double stkPrice1=0);
/*
long &GetStkCode();
char* GetStkName();
double GetStkOriPrice();
double &GetStkPrice();
long &GetStkIss();
double &GetStkRange();
int &GetStkRank();
*/
long &GetStkCode()
{
return stkCode;
}
char* GetStkName()
{
return stkName;
}
double GetStkOriPrice()
{
return stkOriPrice;
}
void SetStkOriPrice(double stkOriPrice1)
{
stkOriPrice = stkOriPrice1;
}
double &GetStkPrice()
{
return stkPrice;
}
long &GetStkIss()
{
return stkIss;
}
double &GetStkRange()
{
return stkRange;
}
int &GetStkRank()
{
return stkRank;
}
void SetStkOriPrice(double stkOriPrice1); //for 中石化
//friend void UpdateStock(Stock &stoObj);
friend ostream &operator <<(ostream &out, Stock &stkObj1);
//friend void ShowLatestStockInfo(Stock &stkObj);
//friend int SearchByStockCode(long stockCode, Stock stockObj[]);
void SetStkIss(int a)
{
stkIss += a;
}
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -