⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 month_add.cpp

📁 boost库提供标准的C++ API 配合dev c++使用,功能更加强大
💻 CPP
字号:


// Simple program that uses the gregorian calendar to find the last
// day of the month.

#include "boost/date_time/gregorian/gregorian.hpp"
#include <iostream>


int
main()
{

  using namespace boost::gregorian;
  typedef boost::date_time::month_functor<date> add_month;

  date d = day_clock::local_day();
  add_month mf(1);
  date d2 = d + mf.get_offset(d);
  std::cout << to_simple_string(d2) << std::endl;

  return 0;

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -