腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
1
回答
即使
使用
-
std
=
c++2a
和
g++-11
,也
无法
使用
std
::
chrono
::
parse
、
在尝试编译以下示例时:
std
::
chrono
::sys_time<
std
::
chrono
::microseconds> timestamp;ss >>
std
::
chrono
::
parse
("%Y-%m-%d %T", timestamp); 我得到了: error: ‘
parse
’ is not a member of ‘<e
浏览 123
提问于2021-08-12
得票数 0
1
回答
针对musl
和
glibc将数据/时间转换为tm/time_point。共同方式
、
、
、
我想将字符串数据转换为struct tm (c)或
std
::
chrono
::time_point。问题是我想为标准libc (glibc
和
)解决方案。我有树标准格式,我想解析。
std
::get_time有一个有什么想法吗?我不想像在get_time那样
使用
流。但如果有必要的话。(可以
使用
GCC5>
和
c++11标准)
浏览 1
提问于2017-08-17
得票数 2
回答已采纳
1
回答
Ubuntu 20不支持MAP_FIXED_NOREPLACE
、
、
, char** argv) int fd_addr = open("test", O_CREAT | O_RDWR);
std
errno) << "\n"; }
std
我
使用
Ubuntu 20 (内核5.4.0-131-泛型)
和
<e
浏览 9
提问于2022-10-27
得票数 2
回答已采纳
2
回答
关于将时间戳字符串转换为"HH:MM:SS.microseconds“格式的建议
、
、
、
、
我得到了一个时间戳列表(假设我们有一个现成的
std
::vector<
std
::string>),它是一种
std
::vector<
std
::string> = {"12:27:37.740002", "19将这些字符串解析为某种C++类型(
std
::
chrono
::time_point )的更好方法是什么?以便以后能够执行一些比较
和
排序。例如:从"20:00:07.140902"解析的比较值
浏览 7
提问于2021-12-01
得票数 0
回答已采纳
1
回答
可以推断模板函数中的参数类型吗?
、
、
、
、
我试图用推断的参数类型定义一个模板,但是这个示例不会编译:auto print_stuff(auto x, auto y)
std
::cout << x <<
std
::endl;}#include <iostreamtemplate <class Redun
浏览 0
提问于2019-06-25
得票数 3
回答已采纳
1
回答
在DDMMMYY[25JUN20]中将YYYYMMDD[20200620]转换为c++
、
“”“{
std
::istringstream ss("25JUN20");
std
::time_t time = mktime(&tm);
std
::cout << tm.tm_year <<
std
浏览 3
提问于2021-09-14
得票数 1
回答已采纳
2
回答
怎样才能找到两个日期之间的天数c++
、
class Solution { int daysBetweenDates(string date1, string date2) { }我有这个功能。假设我有参数我怎样才能找到它们作为标题呢?非常感谢!
浏览 12
提问于2022-11-07
得票数 1
1
回答
std
::time_point从
和
到
std
::string
、
、
我试图替换一些
使用
c++20
std
::
chrono
的boost::gregorian代码,希望消除boost构建的盲目性。代码正在读取
和
写入json (
使用
nlohmann),因此转换日期到
std
::string的能力至关重要。对于<
浏览 5
提问于2020-05-29
得票数 4
回答已采纳
1
回答
C++中当前的UTC时间点
、
、
、
我希望通过网络连接发送一个时间点来检测ping时间
和
其他计算。时间必须有毫秒的精度,但要
使用
:
std
::
chrono
我读过一些关于
std
::
chrono
::utc_clock的文章,但是
即使
使用
C++20,我也<e
浏览 3
提问于2020-08-20
得票数 3
回答已采纳
1
回答
C++
Chrono
-如何在
std
::atomic<long long>上
使用
duration_cast?
、
、
、
这个method在ms中获得了一个时代{ const long long epoch =
std
::
chrono
::duration_cast<
std
::
浏览 5
提问于2017-11-20
得票数 0
回答已采纳
1
回答
如何在启用g++、模块的情况下成功地编译任何内容?
、
、
、
、
我有以下文件: Testing2.cpp:#include <iostream>
std
::string ss = "aaaa";
std
::cout << ss << "\n";当我像这样编译它:
g++-11
-o Testing2 Testing2.cpp -
std
=c++20时当我像这样编译它
浏览 9
提问于2022-05-01
得票数 4
1
回答
如何
使用
GCC 9将`
std
::filesystem::file_time_type`转换为字符串
、
、
#include <
chrono
>#include <iomanip>#include <sstream> namespacefile_time)::clock
和
std
::
chrono
::file_clock,同时
使用
了C++17
和
C++ 20,但它们都不起作用。$ g++-9 -
std
=
c++2a
-W
浏览 0
提问于2019-06-27
得票数 11
1
回答
c++14中是否有__cplusplus的标准定义?
、
我正在寻找设置一些预处理器的东西,我想要一个更准确的数字来定义C++14中的__cplusplus应该是什么。有没有标准要求的?
浏览 0
提问于2014-09-29
得票数 52
回答已采纳
2
回答
如何将字符串转换回time_point?
、
、
、
我将
使用
system_clock time_point,将其转换为字符串,然后将其保存到配置文件中。 auto m_lastShuffleTimeTimeT=
std
::
chrono
::system_clock::to_time_t
浏览 4
提问于2021-06-17
得票数 0
3
回答
基于
std
::
chrono
::high_resolution_clock的帧定时器
、
、
因此,在MSVC上,我定义的别名将只
使用
std
::
chrono
::steady_clock。这并不一定适用于libstdc++
和
libc++,因此
使用
了别名。但对于
std
::
chrono
::steady_clock
和
std
::
chrono
::system_clock来说,这不也是真的吗?例如,我找不到任何东西来保证时钟之间的周期必须在特定的单位。我的问题是,在
使用
std
::
浏览 2
提问于2021-04-23
得票数 3
回答已采纳
3
回答
运行指定持续时间的函数: C++
和
<
chrono
>
、
、
我需要实现一个函数,该函数应该在指定的持续时间内执行指定的任务,并将其作为参数(
std
::
chrono
::milliseconds)传递给它。我想出了密码:{ start =
std
::
chron
浏览 2
提问于2015-02-27
得票数 3
回答已采纳
1
回答
从字符串创建
std
::
chrono
::time_point
、
像这样的main() using namespace date;
std
::cout <<
std
::
chrono
::system_clock::now() << '\n'用
std
::
chrono
::time_point在C++20中创建C++20的正确方法是什么?
浏览 6
提问于2022-02-19
得票数 5
回答已采纳
1
回答
将字符串转换为日期C++
、
、
、
#include #include #include {
std
::wistringstream ss{ L"4/28/2022" }; ss >>
std
::get_time(&dt, date_t
浏览 0
提问于2022-06-18
得票数 1
回答已采纳
1
回答
使用
C++的数据库读取时间
、
我试图
使用
Hinnant的日期库()将用户输入读入日期时间对象。我想
使用
这个库,因为它是现代的,并且将包含在C++20中。
std
::
chrono
::system_clock::time_point dt .&
浏览 1
提问于2020-07-08
得票数 4
回答已采纳
2
回答
是否有方法将作为字符串存储的日期与ctime库中包含的tm结构进行比较?
、
、
在我关于航空预订系统的c++项目中,我有一个作为字符串存储的日期的类成员变量(即"4/20/2022"),现在我
也
需要存储时间,所以我添加了ctime库。问题是我
无法
比较它们,因为日期
和
时间的ctime结构将日期作为单独的成员变量。struct destination_structure {
std
::string
浏览 8
提问于2022-04-20
得票数 0
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
GCC 8.1 发布,新增大量功能
C+11及以上新特性大揭秘:现代化编程语言的必备利器
Simdjson:一个超高速的JSON解析工具
C++ 错题本 MAC环境下 unique_lock try_lock_for函数爆红问题
令人沮丧的C++性能调试
热门
标签
更多标签
云服务器
ICP备案
对象存储
腾讯会议
云直播
活动推荐
运营活动
广告
关闭
领券