| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 6687 人关注过本帖
标题:出个小题 活跃下论坛气氛
只看楼主 加入收藏
wxjeacen
Rank: 7Rank: 7Rank: 7
等 级:禁止访问
帖 子:1291
专家分:628
注 册:2009-3-22
收藏
得分:0 
窘。。。
那么大的数组,怎么填充字符
你以为你懂从定向??

生命不熄,战斗不止.
2009-08-23 13:09
wxjeacen
Rank: 7Rank: 7Rank: 7
等 级:禁止访问
帖 子:1291
专家分:628
注 册:2009-3-22
收藏
得分:0 
以下是引用BlueGuy在2009-8-23 13:04的发言:回复 7楼 wxjeacen你写个输入就行了像这样for (i = 0; i < 1000; i++)    gets(a);
就这么像个傻子一样输入 1k次??

生命不熄,战斗不止.
2009-08-23 13:13
iFreeBSD
Rank: 4
等 级:业余侠客
威 望:4
帖 子:474
专家分:236
注 册:2007-11-5
收藏
得分:4 
用perl吧,几行代码就够了
#!/usr/bin/perl
use warnings ;
use strict ;
@_ = <> ;
chomp(@_) ;
print 'Inputs the pattern:' ;
chomp(my $str = <STDIN>) ;
foreach (@_) {
             print($_,"\n") if $_ =~ m/$str/i ;
}



without further ado, let’s get started
2009-08-23 16:27
wxjeacen
Rank: 7Rank: 7Rank: 7
等 级:禁止访问
帖 子:1291
专家分:628
注 册:2009-3-22
收藏
得分:4 
窘,幸好我懂perl
无非不就是个正则表达式匹配
无所谓算法什么的。


生命不熄,战斗不止.
2009-08-23 17:21
BlueGuy
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:29
帖 子:4476
专家分:4055
注 册:2009-4-18
收藏
得分:0 
Perhaps the most obvious difference is that DirectX, as opposed to OpenGL, is more than just a graphics API. DirectX contains tools to deal with such components of a game as sound, music, input, networking, and multimedia. On the other hand, OpenGL is strictly a graphics API. So what aspect of OpenGL sets it apart from the DirectX graphics component?

Well, first things first: both APIs rely on the use of the traditional graphics pipeline. This is the same pipeline that has been used in computer games since the early days of computer graphics. Although it has been modified in slight ways to adapt with advancements in hardware, the basic idea remains intact.

Both OpenGL and DirectX describe vertices as a set of data consisting of coordinates in space that define the vertex location and any other vertex related data. Graphics primitives, such as points, lines, and triangles, are defined as an ordered set of vertices. There is a difference in how each API handles how vertices are combined to form primitives.

There are a bunch of differences in the DirectX and OpenGL APIs, so I will list a few of those for you. This chart is based off the book, OpenGL Game Programming and a few of these may now be incorrect as new DirectX versions are released. If you wish to correct me, please do via one of the ways listed at the end of this tutorial

我就是真命天子,顺我者生,逆我者死!
2009-08-23 17:42
BlueGuy
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:29
帖 子:4476
专家分:4055
注 册:2009-4-18
收藏
得分:0 
我最喜欢的算法题目就是这道了   可是没人参与讨论

我就是真命天子,顺我者生,逆我者死!
2009-08-24 09:30
龙心
Rank: 3Rank: 3
等 级:论坛游侠
帖 子:14
专家分:159
注 册:2009-8-20
收藏
得分:0 
数据结构中的模式匹配算法写的很详细了
2009-08-24 10:04
机器能
Rank: 2
等 级:论坛游民
帖 子:46
专家分:61
注 册:2009-8-24
收藏
得分:0 
翻译下15楼的英语天书
也许最明显的区别是DirectX的,而不是OpenGL的,不仅仅是一个图形的API。 DirectX包含一组工具来处理一个声音,音乐,输入,网络游戏这样的组件,和多媒体。另一方面,OpenGL是严格意义上的图形API。那么OpenGL的方面;它除了DirectX图形组成部分?

嗯,首先重要的是:两种API对传统图形管道依靠使用。这是相同的管道,已在电脑游戏,因为计算机图形的早期。虽然一直有轻微的调整与硬件进步修改,基本思想保持不变。
OpenGL和DirectX的形容为数据集组成的顶点的坐标定义了顶点地点和任何其他顶点相关的数据空间。基本图形,如点,线,和三角形,被定义为一个有序的顶点集合。有一个在每个API如何处理顶点是如何组合成原语的差异。
有一些在DirectX和OpenGL API的差异一堆,所以我将列出为您的少数。此图是本书的基础上发展,OpenGL游戏编程和这些现在可以作为新的DirectX版本不正确很少被释放。如果你想纠正我,请不要通过的在本教程末尾列出的方法之一


不管黑猫白猫抓住老鼠就是好猫~
2009-08-24 11:09
zqy110007
Rank: 3Rank: 3
来 自:外太空
等 级:论坛游民
威 望:6
帖 子:1493
专家分:82
注 册:2008-11-19
收藏
得分:0 
回复 16楼 BlueGuy
18楼翻译的是对的吗?
 如果是的话, 你找flyue 去聊聊`

每个人都是蛤蟆,只是井的大小不同罢了.
沙石下的泉水,挖得越深,泉水越清.
2009-08-24 14:04
zqy110007
Rank: 3Rank: 3
来 自:外太空
等 级:论坛游民
威 望:6
帖 子:1493
专家分:82
注 册:2008-11-19
收藏
得分:0 
回复 14楼 wxjeacen
grep 总可以啦``

每个人都是蛤蟆,只是井的大小不同罢了.
沙石下的泉水,挖得越深,泉水越清.
2009-08-24 14:05
快速回复:出个小题 活跃下论坛气氛
数据加载中...
 
   



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

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