?? classmethods.cpp
字號:
#include <cstring>
#include "SupMakt.h"
// Class Goods_Info's methods
Goods_Info::Goods_Info(const int kd,
const char * nm,
double pri,
int num,
const char * con_date,
int ht,
double inpri,
int total_num,
double total_pri,
double in_total_pri,
double profi,
double profied){
kind = kd;
strncpy(name, nm, NAME - 1);
name[NAME - 1] = '\0';
price = pri;
number = num;
strncpy(conserve_date, con_date, 10);
conserve_date[10] = '\0';
has_it = ht;
inprice = inpri;
total_number = total_num;
total_price = total_pri;
in_total_price = in_total_pri;
profit = profi;
profited = profied;
}
// Class Foodstuff's methods
Foodstuff::Foodstuff(const int kd,
const char * nm,
double pri,
int num,
const char * con_date,
int ht,
double inpri,
int total_num,
double total_pri,
double in_total_pri,
double profi,
double profied,
const char * sm):Goods_Info(kd, nm, pri, num, con_date, ht, inpri,
total_num, total_pri, in_total_pri, profi, profied){
strncpy(smell, sm, SMELL - 1);
smell[SMELL - 1] = '\0';
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -