gpt4 book ai didi

c++ - Header 中的类尚未声明

转载 作者:行者123 更新时间:2023-11-30 03:46:18 25 4
gpt4 key购买 nike

<分区>

我知道我会踢自己,但我看不到问题...

我一直收到错误/usr/local/awdn/alucard/include/DateTimeConvert.h:12:17: 错误:'DateTimeParse' 尚未声明

但它包括在内。我没看到什么?

#ifndef DATETIMECONVERT_H
#define DATETIMECONVERT_H

#include "TimeZoneSpec.h"
#include "DateTimeParse.h"
#include <vector>
#include <string>

class DateTimeConvert
{
public:
int _to_epoch(DateTimeParse dtp, TimeZoneSpec tzdb);
int _get_weekday_int(DateTimeParse dtp) {return _zeller(dtp);};
std::string _get_weekday_abbr(DateTimeParse dtp) {return WEEKDAY_ABBR[_zeller(dtp)];};
std::string _get_weekday_full(DateTimeParse dtp) {return WEEKDAY_FULL[_zeller(dtp)];};
int _get_month_to_day(int month) {return MONTH_TO_DAY[month];};
int _zeller(DateTimeParse dtp);
private:
const int MIN_TO_SEC = 60;
const int HOUR_TO_SEC = 3600;
const int DAY_TO_SEC = 86400;
const int EPOCH_YEAR = 1970;
const int YEAR_TO_DAY = 365;
const std::vector<int> MONTH_TO_DAY = {31,28,31,30,31,30,31,31,30,31,30,31};
const std::vector<int> ZELLER_MONTH_TABLE = {13,14,3,4,5,6,7,8,9,10,11,12};
const std::vector<std::string> WEEKDAY_ABBR = {"Sat","Sun","Mon","Tue","Wed","Thu","Fri"};
const std::vector<std::string> WEEKDAY_FULL = {"Saturday","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday"};
};

#endif

DateTimeParse.h:

#ifndef DATETIMEPARSE_H
#define DATETIMEPARSE_H

#include "TimeZoneSpec.h"
#include "DateTimeFormat.h"
#include "DateTimeConvert.h"
#include <string>
#include <map>
#include <vector>

class DateTimeParse
{
public:
DateTimeParse();
void _parse(std::string inDateTime, std::string inFormat);
bool _is_dst(DateTimeConvert dtc, TimeZoneSpec tzs);
bool _is_leapyear();;
int _get_year() {return m_year;}
void _set_year(int year) {m_year = year;};
int _get_month() {return m_month;};
void _set_month(int month) {m_month = month;};
int _get_day() {return m_day;};
void _set_day(int day) {m_day = day;};
int _get_hour() {return m_hr;};
void _set_hour(int hr) {m_hr = hr;};
int _get_min() {return m_min;};
void _set_min(int min) {m_min = min;};
int _get_sec() {return m_sec;};
void _set_sec(int sec) {m_sec = sec;};
std::string _get_tz() {return m_tz;};
private:
void _parsepart(std::string inDateTime, std::string inFormat);
std::map<std::string,DateTimeFormat> m_map;
const std::map<std::string,std::vector<int> > m_ftz = {{"Z", {3,0,0}}};
int m_year = 0;
int m_month = 0;
int m_day = 0;
int m_hr = 0;
int m_min = 0;
int m_sec = 0;
std::string m_tz = "CST";
};

#endif

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com