| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2097 人关注过本帖
标题:[加急][求助] 之 顺序栈的初始化问题(解决,解决方案见19楼)
只看楼主 加入收藏
学技术的
Rank: 2
等 级:论坛游民
帖 子:91
专家分:45
注 册:2007-8-5
结帖率:100%
收藏
 问题点数:0 回复次数:18 
[加急][求助] 之 顺序栈的初始化问题(解决,解决方案见19楼)
dev-c++下 clrscr()的头文件是什么.不是conio.h吗?我试了怎么不行???

我的问题我都保留在这个帖子,把它作为我的问题贴.望斑竹勿删.谢谢

[此贴子已经被作者于2007-9-2 12:18:36编辑过]

搜索更多相关主题的帖子: 加急 顺序 方案 
2007-08-27 17:42
coachard
Rank: 3Rank: 3
等 级:新手上路
威 望:7
帖 子:1251
专家分:0
注 册:2007-8-12
收藏
得分:0 
那是TC函数。。。

用system("cls");

偶学编程,也许本身就是一个错。。。
2007-08-27 17:48
学技术的
Rank: 2
等 级:论坛游民
帖 子:91
专家分:45
注 册:2007-8-5
收藏
得分:0 
谢谢.
2007-08-27 17:50
栖柏
Rank: 2
等 级:论坛游民
威 望:3
帖 子:1103
专家分:17
注 册:2007-8-23
收藏
得分:0 
职业侠客
最近在做什么呀
学计算机什么方面呢?

You have lots more to work on! Never give up!c language!
2007-08-27 17:51
学技术的
Rank: 2
等 级:论坛游民
帖 子:91
专家分:45
注 册:2007-8-5
收藏
得分:0 
还有一个就是gettime()函数的头文件是什么?
本来想写一个时钟程序的,由于刚换了Dev-C++,我用#include "dos.h"不行.
在线急等.望高手给指点下.先谢了.
2007-08-28 19:07
学技术的
Rank: 2
等 级:论坛游民
帖 子:91
专家分:45
注 册:2007-8-5
收藏
得分:0 
自己顶
2007-08-28 19:15
百年不亮
Rank: 3Rank: 3
等 级:新手上路
威 望:8
帖 子:789
专家分:0
注 册:2006-4-14
收藏
得分:0 
#include <stdio.h>
#include <time.h>

int main()
{
time_t now;
time(&now);
printf("It's %s", ctime(&now));
return 0;
}

建议你学习c语言标准库,使用标准库才可以在各种编译器中顺利通过。
如果使用某个编译器提供的库函数你就只能绑定在这个上面,可以找个介绍标准库的书看看你编译器实现的库哪些是标准的,哪些是编译器自己提供的。
2007-08-28 19:19
学技术的
Rank: 2
等 级:论坛游民
帖 子:91
专家分:45
注 册:2007-8-5
收藏
得分:0 
对了,time_t now 不应该声明为struct 吗?
2007-08-28 19:24
百年不亮
Rank: 3Rank: 3
等 级:新手上路
威 望:8
帖 子:789
专家分:0
注 册:2006-4-14
收藏
得分:0 

以下内容选自《The C programming Language》2th Edition;

------------------------------------------------------------------------------------------------------------

B.10 Date and Time Functions: <time.h>

The header <time.h> declares types and functions for manipulating date and time. Some functions process local time, which may differ from calendar time, for example because of time zone. clock_t and time_t are arithmetic types representing times, and struct tm holds the components of a calendar time:

int tm_sec; seconds after the minute (0,61)
int tm_min; minutes after the hour (0,59)
int tm_hour; hours since midnight (0,23)
int tm_mday; day of the month (1,31)
int tm_mon; months since January (0,11)
int tm_year; years since 1900
int tm_wday; days since Sunday (0,6)
int tm_yday; days since January 1 (0,365)
int tm_isdst; Daylight Saving Time flag

tm_isdst is positive if Daylight Saving Time is in effect, zero if not, and negative if the information is not available.

clock_t clock(void)
clock returns the processor time used by the program since the beginning of execution, or -1 if unavailable. clock()/CLK_PER_SEC is a time in seconds.
time_t time(time_t *tp)
time returns the current calendar time or -1 if the time is not available. If tp is not NULL, the return value is also assigned to *tp.
double difftime(time_t time2, time_t time1)
difftime returns time2-time1 expressed in seconds.
time_t mktime(struct tm *tp)
mktime converts the local time in the structure *tp into calendar time in the same representation used by time. The components will have values in the ranges shown. mktime returns the calendar time or -1 if it cannot be represented.
The next four functions return pointers to static objects that may be overwritten by other calls.
char *asctime(const struct tm *tp)
asctime< *tp into a string of the form
      Sun Jan  3 15:14:13 1988\n\0
char *ctime(const time_t *tp)
ctime converts the calendar time *tp to local time; it is equivalent to
      asctime(localtime(tp)) 
struct tm *gmtime(const time_t *tp)
gmtime converts the calendar time *tp into Coordinated Universal Time (UTC). It returns NULL if UTC is not available. The name gmtime has historical significance.
struct tm *localtime(const time_t *tp)
localtime converts the calendar time *tp into local time.
size_t strftime(char *s, size_t smax, const char *fmt, const struct tm *tp)
strftime formats date and time information from *tp into s according to fmt, which is analogous to a printf format. Ordinary characters (including the terminating '\0') are copied into s. Each %c is replaced as described below, using values appropriate for the local environment. No more than smax characters are placed into s. strftime returns the number of characters, excluding the '\0', or zero if more than smax characters were produced.

%a abbreviated weekday name.
%A full weekday name.
%b abbreviated month name.
%B full month name.
%c local date and time representation.
%d day of the month (01-31).
%H hour (24-hour clock) (00-23).
%I hour (12-hour clock) (01-12).
%j day of the year (001-366).
%m month (01-12).
%M minute (00-59).
%p local equivalent of AM or PM.
%S second (00-61).
%U week number of the year (Sunday as 1st day of week) (00-53).
%w weekday (0-6, Sunday is 0).
%W week number of the year (Monday as 1st day of week) (00-53).
%x local date representation.
%X local time representation.
%y year without century (00-99).
%Y year with century.
%Z time zone name, if any.
%% %

2007-08-28 19:25
栖柏
Rank: 2
等 级:论坛游民
威 望:3
帖 子:1103
专家分:17
注 册:2007-8-23
收藏
得分:0 
你也教教我好不好

You have lots more to work on! Never give up!c language!
2007-08-28 19:26
快速回复:[加急][求助] 之 顺序栈的初始化问题(解决,解决方案见19楼)
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.048552 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved