| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 532 人关注过本帖
标题:关于续行的格式
只看楼主 加入收藏
xyz_susan
Rank: 1
等 级:新手上路
帖 子:41
专家分:0
注 册:2006-10-4
收藏
 问题点数:0 回复次数:9 
关于续行的格式
哪位高手知道在C语言程序中,如果一个语句一行写不下,下一行继续的格式是什么?
搜索更多相关主题的帖子: 格式 
2006-11-30 19:23
财鸟
Rank: 1
等 级:新手上路
帖 子:132
专家分:0
注 册:2006-11-2
收藏
得分:0 
你顺序写就可以了!!!!!!!!!!
写不下再换行!!!!!!!!!!
2006-11-30 19:40
xyz_susan
Rank: 1
等 级:新手上路
帖 子:41
专家分:0
注 册:2006-10-4
收藏
得分:0 

就是一行写不下,换行继续写就有出错提示,我想是格式不对,换行应该有格式要求的.

2006-11-30 19:46
C语言学习者
Rank: 4
等 级:贵宾
威 望:13
帖 子:1278
专家分:0
注 册:2006-9-26
收藏
得分:0 
举例子

谁有强殖装甲第二部,可以Q我460054868
2006-11-30 20:41
nuciewth
Rank: 14Rank: 14Rank: 14Rank: 14
来 自:我爱龙龙
等 级:贵宾
威 望:104
帖 子:9786
专家分:208
注 册:2006-5-23
收藏
得分:0 
我所知道的应该就是除了宏定义吧.
比如#define .....\
接着写

倚天照海花无数,流水高山心自知。
2006-11-30 20:59
xyz_susan
Rank: 1
等 级:新手上路
帖 子:41
专家分:0
注 册:2006-10-4
收藏
得分:0 

比如:int a[13][19]={{},{},{},....}赋初值,共13行,19列.一行肯定不够,得若干行,不知如何办

2006-11-30 21:04
卧龙孔明
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:59
帖 子:3872
专家分:684
注 册:2006-10-13
收藏
得分:0 

无事,直接回车即可,无错误

例如:
char Positionvalue[2][7][10][9]={ /*棋盘棋子位置价值评定*/
{/*車*/
{9, 12, 10, 10, 10, 10, 10, 12, 9,
11, 12, 10, 13, 10, 13, 10, 12, 11,
10, 12, 10, 11, 10, 11, 10, 12, 10,
10, 11, 10, 11, 10, 11, 10, 11, 10,
10, 14, 10, 14, 10, 14, 10, 14, 10,
10, 13, 10, 11, 10, 11, 10, 13, 10,
10, 11, 10, 11, 10, 11, 10, 11, 10,
10, 11, 10, 10, 10, 10, 10, 11, 10,
10, 13, 11, 11, 10, 11, 11, 13, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10},
{/*馬*/
10, 5, 10, 10, 10, 10, 10, 5, 10,
10, 11, 12, 10, 3, 10, 12, 11, 10,
10, 12, 13, 10, 10, 10, 13, 12, 10,
10, 12, 13, 13, 13, 13, 13, 12, 10,
10, 13, 14, 14, 14, 14, 14, 13, 10,
10, 13, 14, 14, 14, 14, 14, 13, 10,
10, 13, 14, 14, 14, 14, 14, 13, 10,
10, 13, 14, 14, 14, 14, 14, 13, 10,
10, 11, 12, 12, 12, 12, 12, 11, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10},
{/*象*/
0, 0, 10, 0, 0, 0, 10, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 13, 0, 0, 0, 8,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 7, 0, 0, 0, 7, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0},
{/*士*/
0, 0, 0, 10, 0, 10, 0, 0, 0,
0, 0, 0, 0, 12, 0, 0, 0, 0,
0, 0, 0, 9, 0, 9, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0},
{/*将*/
0, 0, 0, 9, 13, 9, 0, 0, 0,
0, 0, 0, 5, 5, 5, 0, 0, 0,
0, 0, 0, 1, 1, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0},
{/*炮*/
10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 11, 13, 13, 15, 13, 13, 11, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 11, 11, 11, 11, 11, 11, 11, 10,
10, 11, 10, 10, 10, 10, 10, 11, 10,
10, 11, 10, 10, 10, 10, 10, 11, 10,
10, 11, 10, 10, 10, 10, 10, 11, 10,
10, 11, 10, 10, 10, 10, 10, 11, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10},
{/*卒*/
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 2, 0, 5, 0, 2, 0, 1,
1, 0, 3, 0, 1, 0, 3, 0, 1,
10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 11, 11, 12, 12, 12, 11, 11, 10,
10, 11, 11, 13, 13, 13, 11, 11, 10,
10, 11, 11, 13, 12, 13, 11, 11, 10,
1, 2, 3, 4, 4, 4, 3, 2, 1}},

{{/*俥*/
10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 12, 11, 11, 10, 11, 11, 12, 10,
10, 11, 10, 10, 10, 10, 10, 11, 10,
10, 11, 10, 11, 10, 11, 10, 11, 10,
10, 13, 10, 11, 10, 11, 10, 13, 10,
10, 14, 10, 14, 10, 14, 10, 14, 10,
10, 11, 10, 11, 10, 11, 10, 11, 10,
10, 12, 10, 11, 10, 11, 10, 12, 10,
11, 12, 10, 13, 10, 13, 10, 12, 11,
9, 12, 10, 10, 10, 10, 10, 12, 9},
{/*傌*/
10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 11, 12, 12, 12, 12, 12, 11, 10,
10, 13, 14, 14, 14, 14, 14, 13, 10,
10, 13, 14, 14, 14, 14, 14, 13, 10,
10, 13, 14, 14, 14, 14, 14, 13, 10,
10, 13, 14, 14, 14, 14, 14, 13, 10,
10, 12, 13, 13, 13, 13, 13, 12, 10,
10, 12, 13, 10, 10, 10, 13, 12, 10,
10, 11, 12, 10, 1, 10, 12, 11, 10,
10, 5, 10, 10, 10, 10, 10, 5, 10},
{/*相*/
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 7, 0, 0, 0, 7, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
8, 0, 0, 0, 13, 0, 0, 0, 8,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 10, 0, 0, 0, 10, 0, 0},
{/*仕*/
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 9, 0, 9, 0, 0, 0,
0, 0, 0, 0, 12, 0, 0, 0, 0,
0, 0, 0, 10, 0, 10, 0, 0, 0},
{/*帅*/
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 0, 0, 0,
0, 0, 0, 5, 5, 5, 0, 0, 0,
0, 0, 0, 9, 13, 9, 0, 0, 0},
{/*砲*/
10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 11, 10, 10, 10, 10, 10, 11, 10,
10, 11, 10, 10, 10, 10, 10, 11, 10,
10, 11, 10, 10, 10, 10, 10, 11, 10,
10, 11, 10, 10, 10, 10, 10, 11, 10,
10, 11, 11, 11, 11, 11, 11, 11, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 11, 13, 13, 15, 13, 13, 11, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10},
{/*兵*/
1, 2, 3, 4, 4, 4, 3, 2, 1,
10, 11, 11, 13, 12, 13, 11, 11, 10,
10, 11, 11, 13, 13, 13, 11, 11, 10,
10, 11, 11, 12, 12, 12, 11, 11, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10,
1, 0, 3, 0, 1, 0, 3, 0, 1,
1, 0, 2, 0, 5, 0, 2, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0}}};

[此贴子已经被作者于2006-11-30 21:06:59编辑过]


My Blog: www.aiexp.info
虽然我的路是从这里开始的,但是这里不再是乐土.感谢曾经影响过,引导过,帮助过我的董凯,飞燕,leeco,starwing,Rockcarry,soft_wind等等等等.别了,BCCN.
2006-11-30 21:06
C语言学习者
Rank: 4
等 级:贵宾
威 望:13
帖 子:1278
专家分:0
注 册:2006-9-26
收藏
得分:0 
是这样麻烦

谁有强殖装甲第二部,可以Q我460054868
2006-11-30 21:14
xyz_susan
Rank: 1
等 级:新手上路
帖 子:41
专家分:0
注 册:2006-10-4
收藏
得分:0 
感谢回复,我明天一试
2006-11-30 21:33
adm_qxx
Rank: 1
等 级:新手上路
帖 子:92
专家分:0
注 册:2005-4-5
收藏
得分:0 

用反斜杠 \ 可以续行,
另外如果是字符串则可以这样

“字符串”
“继续”


“字符串续行”
等价


学习是进步的基础.
2006-12-01 20:30
快速回复:关于续行的格式
数据加载中...
 
   



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

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