| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 771 人关注过本帖
标题:[求助]怎样转换一个字符二维数组到一维数组~
取消只看楼主 加入收藏
gonua
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2006-4-16
收藏
 问题点数:0 回复次数:1 
[求助]怎样转换一个字符二维数组到一维数组~

怎样转换下面的二维数组到一维数组,然后输入数字,然后显示出输入数字在数组中相对应的词
char commonWords[13][60] =
{"C is a structured, procedural programming",
"language that has been widely used both for",
"operating systems and applications and that has",
"had a wide following in the academic community.",
"Many versions of Unix-based operating systems are",
"written in C. With the increasing popularity of",
"object-oriented programming, C is being rapidly",
"replaced as "the" programming language by C++,",
"a superset of the C language that uses an",
"entirely different set of programming concepts,",
"and by Java, a language similar to but simpler",
"than C++, that was designed for use in",
"distributed networks."
};

Enter the number : 5
Word at that index: programming

请各位帮帮我,我写出来的程序总是显示乱码,要不就出错,我都郁闷了。。。

搜索更多相关主题的帖子: 字符 
2007-03-24 21:42
gonua
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2006-4-16
收藏
得分:0 

我主要想知道如何转换这个二维数组到一维数组。。。。

ps: 我刚试了楼上回复的,出来的答案是错的。。。

[此贴子已经被作者于2007-3-24 22:09:28编辑过]

2007-03-24 22:08
快速回复:[求助]怎样转换一个字符二维数组到一维数组~
数据加载中...
 
   



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

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