百度360必应搜狗淘宝本站头条
当前位置:网站首页 > 技术分析 > 正文

C++|一个函数为什么调用一次正常,调用多次会出错?

liebian365 2024-10-22 15:34 6 浏览 0 评论

看下面小程序及输出:

#include <string>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;

string jieqi[] = {"小寒","大寒",
 "立春","雨水","惊蛰","春分","清明","谷雨",
 "立夏","小满","芒种","夏至","小暑","大暑",
 "立秋","处暑","白露","秋分","寒露","霜降",
 "立冬","小雪","大雪","冬至"};

int jieqiDiffMinu[] = {0,21208, // 1900年的各个节气到小寒的分钟数
 42467,63836,85337,107014,128867,150921,
 173149,195551,218072,240693,263343,285989,
 308563,331033,353350,375494,397447,419210,
 440795,462224,483532,504758};

unsigned int LunarCalendarDay;
unsigned int LunarCalendarTable[] = // 199
{
0x04AE53,0x0A5748,0x5526BD,0x0D2650,0x0D9544,0x46AAB9,0x056A4D,0x09AD42,0x24AEB6,0x04AE4A,/*1901-1910*/
0x6A4DBE,0x0A4D52,0x0D2546,0x5D52BA,0x0B544E,0x0D6A43,0x296D37,0x095B4B,0x749BC1,0x049754,/*1911-1920*/
0x0A4B48,0x5B25BC,0x06A550,0x06D445,0x4ADAB8,0x02B64D,0x095742,0x2497B7,0x04974A,0x664B3E,/*1921-1930*/
0x0D4A51,0x0EA546,0x56D4BA,0x05AD4E,0x02B644,0x393738,0x092E4B,0x7C96BF,0x0C9553,0x0D4A48,/*1931-1940*/
0x6DA53B,0x0B554F,0x056A45,0x4AADB9,0x025D4D,0x092D42,0x2C95B6,0x0A954A,0x7B4ABD,0x06CA51,/*1941-1950*/
0x0B5546,0x555ABB,0x04DA4E,0x0A5B43,0x352BB8,0x052B4C,0x8A953F,0x0E9552,0x06AA48,0x6AD53C,/*1951-1960*/
0x0AB54F,0x04B645,0x4A5739,0x0A574D,0x052642,0x3E9335,0x0D9549,0x75AABE,0x056A51,0x096D46,/*1961-1970*/
0x54AEBB,0x04AD4F,0x0A4D43,0x4D26B7,0x0D254B,0x8D52BF,0x0B5452,0x0B6A47,0x696D3C,0x095B50,/*1971-1980*/
0x049B45,0x4A4BB9,0x0A4B4D,0xAB25C2,0x06A554,0x06D449,0x6ADA3D,0x0AB651,0x093746,0x5497BB,/*1981-1990*/
0x04974F,0x064B44,0x36A537,0x0EA54A,0x86B2BF,0x05AC53,0x0AB647,0x5936BC,0x092E50,0x0C9645,/*1991-2000*/
0x4D4AB8,0x0D4A4C,0x0DA541,0x25AAB6,0x056A49,0x7AADBD,0x025D52,0x092D47,0x5C95BA,0x0A954E,/*2001-2010*/
0x0B4A43,0x4B5537,0x0AD54A,0x955ABF,0x04BA53,0x0A5B48,0x652BBC,0x052B50,0x0A9345,0x474AB9,/*2011-2020*/
0x06AA4C,0x0AD541,0x24DAB6,0x04B64A,0x69573D,0x0A4E51,0x0D2646,0x5E933A,0x0D534D,0x05AA43,/*2021-2030*/
0x36B537,0x096D4B,0xB4AEBF,0x04AD53,0x0A4D48,0x6D25BC,0x0D254F,0x0D5244,0x5DAA38,0x0B5A4C,/*2031-2040*/
0x056D41,0x24ADB6,0x049B4A,0x7A4BBE,0x0A4B51,0x0AA546,0x5B52BA,0x06D24E,0x0ADA42,0x355B37,/*2041-2050*/
0x09374B,0x8497C1,0x049753,0x064B48,0x66A53C,0x0EA54F,0x06B244,0x4AB638,0x0AAE4C,0x092E42,/*2051-2060*/
0x3C9735,0x0C9649,0x7D4ABD,0x0D4A51,0x0DA545,0x55AABA,0x056A4E,0x0A6D43,0x452EB7,0x052D4B,/*2061-2070*/
0x8A95BF,0x0A9553,0x0B4A47,0x6B553B,0x0AD54F,0x055A45,0x4A5D38,0x0A5B4C,0x052B42,0x3A93B6,/*2071-2080*/
0x069349,0x7729BD,0x06AA51,0x0AD546,0x54DABA,0x04B64E,0x0A5743,0x452738,0x0D264A,0x8E933E,/*2081-2090*/
0x0D5252,0x0DAA47,0x66B53B,0x056D4F,0x04AE45,0x4A4EB9,0x0A4D4C,0x0D1541,0x2D92B5 /*2091-2099*/
};
int MonthAdd[12] = {0,31,59,90,120,151,181,212,243,273,304,334};
bool isLeapYear(int y)
{
 return (y%4==0&&y%100!=0 || y%400==0);
}

int sTerm(int y,int n) { // 某年的第n个节气为几日(从0小寒起算)
 double ms = 31556925974.7*(y-1900); // 31556925974.7是一年(365.2422)的豪秒数
 ms += jieqiDiffMinu[n]*60*1000.0; // 1分钟60000毫秒,sTermInfo记录的是分钟数
 // 1000.0处理溢出

 ms += ((6*24+2)*60+5)*60*1000; // 1900年1月6号2时5分为小寒
 for(int i=1900; i<y; i++)
 {
 for(int k=1;k<=365;k++)
 ms-=24*3600000;
 if(isLeapYear(i))
 ms-=24*3600000;
 //ms-=366*24*3600000; // integral constant overflow,可以加.0
 }
 double ds = ms/(24*3600000);
 int monDays[] = {31,28,31,30,31,30,31,31,30,31,30,31};
 if(isLeapYear(y))
 monDays[1] = 29;
 for(int j=0;j<12;j++)
 if(ds>monDays[j])
 ds-=monDays[j];
 return(ds); 
}
string Gan[]={"甲","乙","丙","丁","戊","己","庚","辛","壬","癸"};
string Zhi[]={"子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"};
string Shu[]={"鼠","牛","虎","免","龙","蛇","马","羊","猴","鸡","狗","猪"};
/*
10天干=(y%10)-3),如果小于0,再加10(y是年份);
12地支=(y%12)-3),如果小于0,再加12;
例:求公元2018年的干支?
年干=8-3 =5 =戊(2018/10的余数是8);
年支=2-3+12=11=戌(2018/12的余数是2);
*/
int gan(int y)
{
 int g = (y%10)-3;
 if(g<=0)
 g+=10;
 return g;
}

int zhi(int y)
{
 int z = (y%12)-3;
 if(z<=0)
 z+=12;
 return z;
}

int LunarCalendar(int year,int month,int day)
{
 int Spring_NY; // 记录春节离当年元旦的天数。
 int Sun_NY; // 记录阳历日离当年元旦的天数。
 if ( ((LunarCalendarTable[year-1901] & 0x0060) >> 5) == 1)
 Spring_NY = (LunarCalendarTable[year-1901] & 0x001F) - 1;
 else
 Spring_NY = (LunarCalendarTable[year-1901] & 0x001F) - 1 + 31;
 Sun_NY = MonthAdd[month-1] + day - 1;
 if ( (!(year % 4)) && (month > 2))
 Sun_NY++;
 int StaticDayCount; // 记录大小月的天数29或30
 int index ; // 记录从哪个月开始来计算。
 int flag; // 对闰月的特殊处理,判断阳历日在春节前还是春节后
 if (Sun_NY >= Spring_NY) // 阳历日在春节后(含春节那天)
 {
 Sun_NY -= Spring_NY;
 month = 1;
 index = 1;
 flag = 0;
 if ( ( LunarCalendarTable[year - 1901] & (0x80000 >> (index-1)) ) ==0)
 StaticDayCount = 29;
 else
 StaticDayCount = 30;
 while (Sun_NY >= StaticDayCount)
 {
 Sun_NY -= StaticDayCount;
 index++;
 if (month == ((LunarCalendarTable[year - 1901] & 0xF00000) >> 20) )
 {
 flag = ~flag;
 if (flag == 0)
 month++;
 }
 else
 month++;
 if ( ( LunarCalendarTable[year - 1901] & (0x80000 >> (index-1)) ) ==0)
 StaticDayCount=29;
 else
 StaticDayCount=30;
 }
 day = Sun_NY + 1;
 }
 else // 阳历日在春节前
 {
 Spring_NY -= Sun_NY;
 year--;
 month = 12;
 if ( ((LunarCalendarTable[year - 1901] & 0xF00000) >> 20) == 0)
 index = 12;
 else
 index = 13;
 flag = 0;
 if ( ( LunarCalendarTable[year - 1901] & (0x80000 >> (index-1)) ) ==0)
 StaticDayCount = 29;
 else
 StaticDayCount = 30;
 while (Spring_NY > StaticDayCount)
 {
 Spring_NY -= StaticDayCount;
 index--;
 if (flag == 0)
 month--;
 if (month == ((LunarCalendarTable[year - 1901] & 0xF00000) >> 20))
 flag = ~flag;
 if ( ( LunarCalendarTable[year - 1901] & (0x80000 >> (index-1)) ) ==0)
 StaticDayCount = 29;
 else
 StaticDayCount = 30;
 }
 day = StaticDayCount - Spring_NY + 1;
 }
 LunarCalendarDay |= day;
 LunarCalendarDay |= (month << 6);
 if (month == ((LunarCalendarTable[year - 1901] & 0xF00000) >> 20))
 return 1;
 else
 return 0;
}
// 用动态内存存储以下下级也是内存访问错误
string LunarMonthDay(unsigned int year,unsigned int month, unsigned int day)
{

 const char* ChDay[] = {"*","初一","初二","初三","初四","初五",
 "初六","初七","初八","初九","初十",
 "十一","十二","十三","十四","十五",
 "十六","十七","十八","十九","二十",
 "廿一","廿二","廿三","廿四","廿五",
 "廿六","廿七","廿八","廿九","三十"};

 const char* ChMonth[] = {"*","正","二","三","四","五","六","七","八","九","十","十一","腊"};

 char str[13] = "";
 if (LunarCalendar(year,month,day))
 {
 strcat(str,"闰");
 strcat(str,ChMonth[(LunarCalendarDay & 0x3C0) >> 6]);
 }
 else
 strcat(str,ChMonth[(LunarCalendarDay & 0x3C0) >> 6]);
 strcat(str,"月");
 strcat(str,ChDay[LunarCalendarDay & 0x3F]);
 string strs = str;
 return strs;
}
void jieqiYear(int y)
{
 printf("%d(%s%s%s年)的节气和对应公历日期和农历日期:\n", y,
 Gan[gan(y)-1].c_str(),
 Zhi[zhi(y)-1].c_str(),
 Shu[zhi(y)-1].c_str());

 for(int m=0;m<12;m++)
 {
 printf("%2d月: ",m+1);
 int jie = sTerm(y,m*2);
 printf("%s:%d %s ",jieqi[m*2].c_str(),jie, LunarMonthDay(y,m+1,jie).c_str());
 int qi = sTerm(y,m*2+1);

 printf("%s:%d %s\n",jieqi[m*2+1].c_str(),qi, LunarMonthDay(y,m+1,qi).c_str());
 
 if((m+1)%3==0)
 printf("\n");
 }
}
main()
{
#if 1

	long t = time(NULL);
	struct tm* Local = localtime(&t);
	int y = Local->tm_year + 1900;


//for(int i = 1;i<12;i++) // 出错
	jieqiYear(y);

#else
 //printf("\n%s\n",LunarMonthDay(1977,4,19).c_str());
 printf("请输入年份即输出对应各月的节气和日期:");
 int y = 2019;
 //scanf("%d",&y);
 jieqiYear(y);
 

#endif
	system("pause");

}

有问题的函数可以追溯到LunarCalendar(),是因为其修改了全局变量LunarCalendarDay,该变量的后六位保存的是日期信息(几日),剩下的位保存的是月份信息。且该全局变量在其它函数中有用做数组下标,首次修改可控,多次修改就不可控了。这就是全局变量的危险性,特别是当其用做数组下标,且程序较复杂时。(LunarCalendarDay()返回的是农历是否是闰年的信息)

对上面函数可简单将全局变量更改为输出的引用参数即可:



#include <string>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;

string jieqi[] = {"小寒","大寒",
				 "立春","雨水","惊蛰","春分","清明","谷雨",
				 "立夏","小满","芒种","夏至","小暑","大暑",
				 "立秋","处暑","白露","秋分","寒露","霜降",
				 "立冬","小雪","大雪","冬至"};

int jieqiDiffMinu[] = {0,21208,					// 1900年的各个节气到小寒的分钟数
					 42467,63836,85337,107014,128867,150921,
					 173149,195551,218072,240693,263343,285989,
					 308563,331033,353350,375494,397447,419210,
					 440795,462224,483532,504758};


unsigned int LunarCalendarTable[] = // 199
{
0x04AE53,0x0A5748,0x5526BD,0x0D2650,0x0D9544,0x46AAB9,0x056A4D,0x09AD42,0x24AEB6,0x04AE4A,/*1901-1910*/
0x6A4DBE,0x0A4D52,0x0D2546,0x5D52BA,0x0B544E,0x0D6A43,0x296D37,0x095B4B,0x749BC1,0x049754,/*1911-1920*/
0x0A4B48,0x5B25BC,0x06A550,0x06D445,0x4ADAB8,0x02B64D,0x095742,0x2497B7,0x04974A,0x664B3E,/*1921-1930*/
0x0D4A51,0x0EA546,0x56D4BA,0x05AD4E,0x02B644,0x393738,0x092E4B,0x7C96BF,0x0C9553,0x0D4A48,/*1931-1940*/
0x6DA53B,0x0B554F,0x056A45,0x4AADB9,0x025D4D,0x092D42,0x2C95B6,0x0A954A,0x7B4ABD,0x06CA51,/*1941-1950*/
0x0B5546,0x555ABB,0x04DA4E,0x0A5B43,0x352BB8,0x052B4C,0x8A953F,0x0E9552,0x06AA48,0x6AD53C,/*1951-1960*/
0x0AB54F,0x04B645,0x4A5739,0x0A574D,0x052642,0x3E9335,0x0D9549,0x75AABE,0x056A51,0x096D46,/*1961-1970*/
0x54AEBB,0x04AD4F,0x0A4D43,0x4D26B7,0x0D254B,0x8D52BF,0x0B5452,0x0B6A47,0x696D3C,0x095B50,/*1971-1980*/
0x049B45,0x4A4BB9,0x0A4B4D,0xAB25C2,0x06A554,0x06D449,0x6ADA3D,0x0AB651,0x093746,0x5497BB,/*1981-1990*/
0x04974F,0x064B44,0x36A537,0x0EA54A,0x86B2BF,0x05AC53,0x0AB647,0x5936BC,0x092E50,0x0C9645,/*1991-2000*/
0x4D4AB8,0x0D4A4C,0x0DA541,0x25AAB6,0x056A49,0x7AADBD,0x025D52,0x092D47,0x5C95BA,0x0A954E,/*2001-2010*/
0x0B4A43,0x4B5537,0x0AD54A,0x955ABF,0x04BA53,0x0A5B48,0x652BBC,0x052B50,0x0A9345,0x474AB9,/*2011-2020*/
0x06AA4C,0x0AD541,0x24DAB6,0x04B64A,0x69573D,0x0A4E51,0x0D2646,0x5E933A,0x0D534D,0x05AA43,/*2021-2030*/
0x36B537,0x096D4B,0xB4AEBF,0x04AD53,0x0A4D48,0x6D25BC,0x0D254F,0x0D5244,0x5DAA38,0x0B5A4C,/*2031-2040*/
0x056D41,0x24ADB6,0x049B4A,0x7A4BBE,0x0A4B51,0x0AA546,0x5B52BA,0x06D24E,0x0ADA42,0x355B37,/*2041-2050*/
0x09374B,0x8497C1,0x049753,0x064B48,0x66A53C,0x0EA54F,0x06B244,0x4AB638,0x0AAE4C,0x092E42,/*2051-2060*/
0x3C9735,0x0C9649,0x7D4ABD,0x0D4A51,0x0DA545,0x55AABA,0x056A4E,0x0A6D43,0x452EB7,0x052D4B,/*2061-2070*/
0x8A95BF,0x0A9553,0x0B4A47,0x6B553B,0x0AD54F,0x055A45,0x4A5D38,0x0A5B4C,0x052B42,0x3A93B6,/*2071-2080*/
0x069349,0x7729BD,0x06AA51,0x0AD546,0x54DABA,0x04B64E,0x0A5743,0x452738,0x0D264A,0x8E933E,/*2081-2090*/
0x0D5252,0x0DAA47,0x66B53B,0x056D4F,0x04AE45,0x4A4EB9,0x0A4D4C,0x0D1541,0x2D92B5 /*2091-2099*/
};
int MonthAdd[12] = {0,31,59,90,120,151,181,212,243,273,304,334};
bool isLeapYear(int y)
{
	return (y%4==0&&y%100!=0 || y%400==0);
}

int sTerm(int y,int n) {					// 某年的第n个节气为几日(从0小寒起算)
	double ms = 31556925974.7*(y-1900); 	// 31556925974.7是一年(365.2422)的豪秒数
	ms += jieqiDiffMinu[n]*60*1000.0;		// 1分钟60000毫秒,sTermInfo记录的是分钟数
											// 1000.0处理溢出

	ms +=	((6*24+2)*60+5)*60*1000; 		// 1900年1月6号2时5分为小寒
	//ms -= 6*3600000;						// adjust ,error
	for(int i=1900; i<y; i++)
	{
		for(int k=1;k<=365;k++)
			ms-=24*3600000;
		if(isLeapYear(i))
			ms-=24*3600000;
		//ms-=366*24*3600000; // integral constant overflow
	}
 double ds = ms/(24*3600000);

	int monDays[] = {31,28,31,30,31,30,31,31,30,31,30,31};
	if(isLeapYear(y))
		monDays[1] = 29;
	for(int j=0;j<12;j++)
		if(ds>monDays[j])
			ds-=monDays[j];

	return(ds);	
} // 2019年夏至时间	6月21日 23:54:09 ds 22.05


string Gan[]={"甲","乙","丙","丁","戊","己","庚","辛","壬","癸"};
string Zhi[]={"子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"};
string Shu[]={"鼠","牛","虎","免","龙","蛇","马","羊","猴","鸡","狗","猪"};
/*
10天干=(y%10)-3),如果小于0,再加10(y是年份);
12地支=(y%12)-3),如果小于0,再加12;
例:求公元2018年的干支?
年干=8-3 =5 =戊(2018/10的余数是8);
年支=2-3+12=11=戌(2018/12的余数是2);
*/
int gan(int y)
{
	int g = (y%10)-3;
	if(g<=0)
		g+=10;
	return g;
}

int zhi(int y)
{
	int z = (y%12)-3;
	if(z<=0)
		z+=12;
	return z;
}

int LunarCalendar(int year,int month,int day, unsigned int& LunarCalendarDay)
{
	int Spring_NY;	// 记录春节离当年元旦的天数。
	int Sun_NY;		// 记录阳历日离当年元旦的天数。
	if ( ((LunarCalendarTable[year-1901] & 0x0060) >> 5) == 1)
		Spring_NY = (LunarCalendarTable[year-1901] & 0x001F) - 1;
	else
		Spring_NY = (LunarCalendarTable[year-1901] & 0x001F) - 1 + 31;
	Sun_NY = MonthAdd[month-1] + day - 1;
	if ( (!(year % 4)) && (month > 2))
		Sun_NY++;
	int StaticDayCount; // 记录大小月的天数29或30
	int index ;			// 记录从哪个月开始来计算。
	int flag;			// 对闰月的特殊处理,判断阳历日在春节前还是春节后
	if (Sun_NY >= Spring_NY) // 阳历日在春节后(含春节那天)
	{
		Sun_NY -= Spring_NY;
		month = 1;
		index = 1;
		flag = 0;
		if ( ( LunarCalendarTable[year - 1901] & (0x80000 >> (index-1)) ) ==0)
			StaticDayCount = 29;
		else
			StaticDayCount = 30;
		while (Sun_NY >= StaticDayCount)
		{
			Sun_NY -= StaticDayCount;
			index++;
			if (month == ((LunarCalendarTable[year - 1901] & 0xF00000) >> 20) )
			{
				flag = ~flag;
				if (flag == 0)
					month++;
			}
			else
				month++;
			if ( ( LunarCalendarTable[year - 1901] & (0x80000 >> (index-1)) ) ==0)
				StaticDayCount=29;
			else
				StaticDayCount=30;
		}
		day = Sun_NY + 1;
	}
	else // 阳历日在春节前
	{
		Spring_NY -= Sun_NY;
		year--;
		month = 12;
		if ( ((LunarCalendarTable[year - 1901] & 0xF00000) >> 20) == 0)
			index = 12;
		else
			index = 13;
		flag = 0;
		if ( ( LunarCalendarTable[year - 1901] & (0x80000 >> (index-1)) ) ==0)
			StaticDayCount = 29;
		else
			StaticDayCount = 30;
		while (Spring_NY > StaticDayCount)
		{
			Spring_NY -= StaticDayCount;
			index--;
			if (flag == 0)
				month--;
			if (month == ((LunarCalendarTable[year - 1901] & 0xF00000) >> 20))
				flag = ~flag;
			if ( ( LunarCalendarTable[year - 1901] & (0x80000 >> (index-1)) ) ==0)
				StaticDayCount = 29;
			else
				StaticDayCount = 30;
		}
		day = StaticDayCount - Spring_NY + 1;
	}
	LunarCalendarDay |= day;			 
	LunarCalendarDay |= (month << 6);	// LunarCalendarDay低6位存储day,其余位存储month
	if (month == ((LunarCalendarTable[year - 1901] & 0xF00000) >> 20))
		return 1; // 是否是闰年
	else
		return 0;
}

int flag2 = 0; // 辅助处理闰年,农历闰年时,两个月三个节气
string LunarMonthDay(unsigned int year,unsigned int month, unsigned int day)
{
	unsigned int LunarCalendarDay=0;
	const char* ChDay[] = {"*","初一","初二","初三","初四","初五",
								"初六","初七","初八","初九","初十",
								"十一","十二","十三","十四","十五",
								"十六","十七","十八","十九","二十",
								"廿一","廿二","廿三","廿四","廿五",
								"廿六","廿七","廿八","廿九","三十"};

	const char* ChMonth[] = {"*","正","二","三","四","五","六","七","八","九","十","十一","腊"};
	
	char str[13] = "";

	if (LunarCalendar(year,month,day,LunarCalendarDay))
	{

		if(flag2 > 0)
			strcat(str,"闰");
		flag2++;
		strcat(str,ChMonth[(LunarCalendarDay & 0x3C0) >> 6]);
	}
	else
		strcat(str,ChMonth[(LunarCalendarDay & 0x3C0) >> 6]);
	strcat(str,"月");
	strcat(str,ChDay[LunarCalendarDay & 0x3F]);
	string strs = str;
	return strs;
}
void jieqiYear(int y)
{
	printf("\n%d(%s%s%s年)的节气和对应公历日期和农历日期:\n", y,
		Gan[gan(y)-1].c_str(),
		Zhi[zhi(y)-1].c_str(),
		Shu[zhi(y)-1].c_str());
	//int m = 5;
	for(int m=0;m<12;m++)
	{

		int	jie = sTerm(y,m*2);
		printf("%s:%2d月%d日 %12s ",jieqi[m*2].c_str(),m+1,jie, LunarMonthDay(y,m+1,jie).c_str());
		int	qi = sTerm(y,m*2+1);

		printf("%s:%2d月%d %12s\n",jieqi[m*2+1].c_str(),m+1,qi, LunarMonthDay(y,m+1,qi).c_str());
	
		if((m+1)%3==0)
			printf("\n");
	}
}

main()
{
#if 1
	long t = time(NULL);
	struct tm* Local = localtime(&t);
	int y = Local->tm_year + 1900;

//for(int i = 1;i<12;i++) // 出错
	jieqiYear(y);

#else
 //printf("\n%s\n",LunarMonthDay(1977,4,19).c_str());
 printf("请输入年份即输出对应各月的节气和日期:");
 int y = 2019;
 //scanf("%d",&y);
 jieqiYear(y)

#endif
	system("pause");

}

-End-

相关推荐

快递查询教程,批量查询物流,一键管理快递

作为商家,每天需要查询许许多多的快递单号,面对不同的快递公司,有没有简单一点的物流查询方法呢?小编的回答当然是有的,下面随小编一起来试试这个新技巧。需要哪些工具?安装一个快递批量查询高手快递单号怎么快...

一键自动查询所有快递的物流信息 支持圆通、韵达等多家快递

对于各位商家来说拥有一个好的快递软件,能够有效的提高自己的工作效率,在管理快递单号的时候都需要对单号进行表格整理,那怎么样能够快速的查询所有单号信息,并自动生成表格呢?1、其实方法很简单,我们不需要一...

快递查询单号查询,怎么查物流到哪了

输入单号怎么查快递到哪里去了呢?今天小编给大家分享一个新的技巧,它支持多家快递,一次能查询多个单号物流,还可对查询到的物流进行分析、筛选以及导出,下面一起来试试。需要哪些工具?安装一个快递批量查询高手...

3分钟查询物流,教你一键批量查询全部物流信息

很多朋友在问,如何在短时间内把单号的物流信息查询出来,查询完成后筛选已签收件、筛选未签收件,今天小编就分享一款物流查询神器,感兴趣的朋友接着往下看。第一步,运行【快递批量查询高手】在主界面中点击【添...

快递单号查询,一次性查询全部物流信息

现在各种快递的查询方式,各有各的好,各有各的劣,总的来说,还是有比较方便的。今天小编就给大家分享一个新的技巧,支持多家快递,一次能查询多个单号的物流,还能对查询到的物流进行分析、筛选以及导出,下面一起...

快递查询工具,批量查询多个快递快递单号的物流状态、签收时间

最近有朋友在问,怎么快速查询单号的物流信息呢?除了官网,还有没有更简单的方法呢?小编的回答当然是有的,下面一起来看看。需要哪些工具?安装一个快递批量查询高手多个京东的快递单号怎么快速查询?进入快递批量...

快递查询软件,自动识别查询快递单号查询方法

当你拥有多个快递单号的时候,该如何快速查询物流信息?比如单号没有快递公司时,又该如何自动识别再去查询呢?不知道如何操作的宝贝们,下面随小编一起来试试。需要哪些工具?安装一个快递批量查询高手快递单号若干...

教你怎样查询快递查询单号并保存物流信息

商家发货,快递揽收后,一般会直接手动复制到官网上一个个查询物流,那么久而久之,就会觉得查询变得特别繁琐,今天小编给大家分享一个新的技巧,下面一起来试试。教程之前,我们来预览一下用快递批量查询高手...

简单几步骤查询所有快递物流信息

在高峰期订单量大的时候,可能需要一双手当十双手去查询快递物流,但是由于逐一去查询,效率极低,追踪困难。那么今天小编给大家分享一个新的技巧,一次能查询多个快递单号的物流,下面一起来学习一下,希望能给大家...

物流单号查询,如何查询快递信息,按最后更新时间搜索需要的单号

最近有很多朋友在问,如何通过快递单号查询物流信息,并按最后更新时间搜索出需要的单号呢?下面随小编一起来试试吧。需要哪些工具?安装一个快递批量查询高手快递单号若干怎么快速查询?运行【快递批量查询高手】...

连续保存新单号功能解析,导入单号查询并自动识别批量查快递信息

快递查询已经成为我们日常生活中不可或缺的一部分。然而,面对海量的快递单号,如何高效、准确地查询每一个快递的物流信息,成为了许多人头疼的问题。幸运的是,随着科技的进步,一款名为“快递批量查询高手”的软件...

快递查询教程,快递单号查询,筛选更新量为1的单号

最近有很多朋友在问,怎么快速查询快递单号的物流,并筛选出更新量为1的单号呢?今天小编给大家分享一个新方法,一起来试试吧。需要哪些工具?安装一个快递批量查询高手多个快递单号怎么快速查询?运行【快递批量查...

掌握批量查询快递动态的技巧,一键查找无信息记录的两种方法解析

在快节奏的商业环境中,高效的物流查询是确保业务顺畅运行的关键。作为快递查询达人,我深知时间的宝贵,因此,今天我将向大家介绍一款强大的工具——快递批量查询高手软件。这款软件能够帮助你批量查询快递动态,一...

从复杂到简单的单号查询,一键清除单号中的符号并批量查快递信息

在繁忙的商务与日常生活中,快递查询已成为不可或缺的一环。然而,面对海量的单号,逐一查询不仅耗时费力,还容易出错。现在,有了快递批量查询高手软件,一切变得简单明了。只需一键,即可搞定单号查询,一键处理单...

物流单号查询,在哪里查询快递

如果在快递单号多的情况,你还在一个个复制粘贴到官网上手动查询,是一件非常麻烦的事情。于是乎今天小编给大家分享一个新的技巧,下面一起来试试。需要哪些工具?安装一个快递批量查询高手快递单号怎么快速查询?...

取消回复欢迎 发表评论: