如何继续行 [英] How to continue a line

查看:57
本文介绍了如何继续行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试继续执行一行代码,并获得正确的语法.任何帮助表示赞赏.谢谢.

I''m trying to continue a line of code and get seem to get the right syntax. Any help is appreciated. Thank you.

if (( flags & 0x01 && flags & 0x10 ) && (ip_header->destination_ip == *addressValue)) / 
||(( flags & 0x02 && flags & 0x10 ) && (ip_header->destination_ip == *addressValue))/
||(( flags & 0x08 && flags & 0x10 ) && (ip_header->destination_ip == *addressValue))
			{

推荐答案

您无需在C ++中使用延续符号来继续一行代码. C ++将忽略空格.
因此,省去多余的符号,它应该可以工作.

您确实需要使用斜杠在多行上继续一个字符串,这很可能使您感到困惑.
You don''t need to use a continuation symbol in C++ to continue a line of code. C++ will ignore white space.
So leave out the extra symbols and it should work.

You do need the slash for continuing a string on multiple lines, that is likely what confused you.


以这一行开头是否有意义,这是一个问题. :-)

我真的认为这没有道理.如果您花了很多时间阅读任何C ++或C手册,那么从一开始您就会知道C ++或C中没有行.文件中的行尾与空白或制表符的处理方式相同.任何语言构造都可以使用任意多行.您只应不破坏文字,保留字和标识符(名称).只需删除所有末尾的"/"即可. (您从哪儿得到的?它们看起来很熟悉……是从其他语言中获得的?谁告诉您可以或需要在C ++或C中使用它们?)

我认为这没有任何意义,因为您显然在没有阅读其中一本手册的情况下尝试进行编码.和毫无意义.它将真的导致您无处可去.帮自己一个忙,阅读此类手册,对简单的样本进行一些练习,然后再回来.老实说.



等一等!我记得你!您已经问了113个问题!您尝试编写TCP数据包并修改Windows注册表!这是怎么回事?您要么试图拖延我们所有人,要么只是浪费您的时间和时间.请帮自己和我们一个忙:停止这一切,让自己忙于一些有用的事情.例如,学习一些编程-您没有做.从头开始学习,不要着急,否则,您将无所适从.至少考虑一下.

最好的祝福,
—SA
Does it makes sense to start this line, that is a question. :-)

I really think it does not make sense. If you ever took a labor of reading any C++ or C manual, you would know from the very beginning that there are no lines in C++ or C; the end of line in the file is treated the same way as blank space or, say, tab. Any language construct can take any number of lines; you only should not break literals, reserved words and identifiers (names). Just remove all those ''/'' at the end. (Where did you get them? They look familiar… From some other language? Who told you can or need to use them in C++ or C?)

I think it does not make sense because you apparently try to code without reading one of those manuals; and that makes no sense. It will really lead you nowhere. Do yourself a favor, read such manual, practice a bit on simple samples and come back. Honestly.



Wait a second! I remember you! You already asked 113 questions! You try to write TCP packets and modify Windows registry! What''s going on? You either try to troll all us or just waste your time and our time. Please, do yourself and all us a favor: stop all this, get yourself busy with something useful. Learn some programming for example — you''re not doing it. Learn from scratch and with no rush, otherwise it leads you nowhere. At least think about it.

Best wishes,
—SA


将整个内容减少到一张支票吗?

redact the whole thing down to one check?

// or 0x10, 1, 2 & 8 to 0x1b
if (( flags & 0x1b ) && (ip_header->destination_ip == *addressValue))
{
}


这篇关于如何继续行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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