C++基础2020-11-04 & 2020-11-08

2020-11-09  本文已影响0人  忻恆

--- 卷王之卷,我愿称之为HKU第一卷!

C++指针

C++ 引用

C++ 日期 & 时间

time函数

    time_t curtime;
    time(&curtime);
    cout<<ctime(&curtime);
clock_t st = clock();
...
clock_t ed = clock();
cout<<(double)(ed-st)/CLOCKS_PER_SEC;
    timeinfo = localtime(&rawtime);
    timeinfo->tm_year -= 1900;
    timeinfo->tm_mon -= 1;
    timeinfo->tm_mday = day;
    mktime(timeinfo);
    cout<<timeinfo->tm_wday;

C++ 基本的输入输出

C++ 数据结构

struct type_name {
member_type1 member_name1;
member_type2 member_name2;
member_type3 member_name3;
.
.
} object_names;
typedef struct Books
{
   char  title[50];
   char  author[50];
   char  subject[100];
   int   book_id;
}Books;
上一篇 下一篇

猜你喜欢

热点阅读