写函数中的nextline语句 [英] nextline statement in write function

查看:68
本文介绍了写函数中的nextline语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将''\ n''放入outfile.write(record,sizeof(record))。

提前感谢您的帮助。

-

ChrisC - ch ******* @ nospam .yahoo.co.uk

how would I put a ''\n'' in say outfile.write( record, sizeof(record)).
Thank you in advance for your help.
--
ChrisC - ch*******@nospam.yahoo.co.uk

推荐答案

" ChrisC" < CH ******* @ nospam.yahoo.co.uk>写了...
"ChrisC" <ch*******@nospam.yahoo.co.uk> wrote...
我怎么把''\ n''放在说outfile.write(record,sizeof(record))中。
how would I put a ''\n'' in say outfile.write( record, sizeof(record)).




你到底是什么意思?你的意思是,如何使用

ostream :: write输出\ n?这很简单:


outfile.write(" \ n",1);


因为它是如此很简单,我怀疑你是在问这个问题。那么,什么

就是这个put'\ n''在out outfile.write中说...&...;


V


" Victor Bazarov" <五******** @ comAcast.net>在消息中写道

news:SfRVb.264899
"Victor Bazarov" <v.********@comAcast.net> wrote in message
news:SfRVb.264899


na.421405@attbi_s04 ...
na.421405@attbi_s04...
" ChrisC" < CH ******* @ nospam.yahoo.co.uk>写了...
"ChrisC" <ch*******@nospam.yahoo.co.uk> wrote...
我怎么把''\ n''放在outfile.write中(记录,
how would I put a ''\n'' in say outfile.write( record,


sizeof(记录))。
你到底是什么意思?你的意思是,如何使用
ostream :: write输出\ n?这很简单:

outfile.write(" \ n",1);

因为它很简单,我怀疑你是问这个问题。那么,
是什么呢?'put''\ n''在说outfile.write ..."?

sizeof(record)).
What the hell do you mean? Do you mean, how to output a \n using
ostream::write? That''s simple:

outfile.write("\n", 1);

Since it''s so simple, I doubt you''re asking about that. So, what
is this "put ''\n'' in say outfile.write ..."?




也许他的意思是这个:


outfile.write(记录,

sizeof(记录));


Jonathan



Maybe he means this:

outfile.write( record,
sizeof(record) );

Jonathan


这篇关于写函数中的nextline语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆