result意思 C++

result意思 C++,第1张

result就是一个单词吧,就是自己写程序定义的变量或者函数名称,说白了就是自己写的。

HRESULT其实你可以查看msdn的,H开头,一般是一个句柄啦,你可以理解为一个数据类型(就想int一样的东西),我帮你看了一下msdn,下面就是msdn的解释:

(1)com平台

HRESULT

An opaque result handle defined to be zero for a successful return from a function and nonzero if error or status information is returned. To convert an HRESULT into the more detailed SCODE, applications call GetScode(). See also SCODE.

(2)Platform SDK: Automation

H

HRESULT

A value returned from a function call to an interface, consisting of a severity code, context information, a facility code, and a status code that describes the result. For 16-bit Windows systems, the HRESULT is an opaque result handle defined to be zero for a successful return from a function, and nonzero if error or status information is to be returned. To convert an HRESULT into a more detailed SCODE (or return value), applications call GetSCode(). See SCODE.

(3)Platform SDK: MAPI

HRESULT

The HRESULT data type is a 32-bit value that is used to describe an error or warning.

typedef LONG HRESULT

第三个最好理解了吧,typedef,嘿嘿,就是long的意思啦,前面两个其实也差不多吧,都是句柄。

其实你理解为数据类型应该就ok了,当然我也没见过这个,但其实都是一样的,msdn上都会有说明的。

vb没有提示具体在哪一行有错?

第一:

你注意一下,程序里面simpson38rule和simpsons38rule是两个不同类型的变量,两个名字过于相近(就一个s的区别),很容易弄混。

results是一个double类型的数组,所以我个人认为最后两句直接写成下面两句就好:

simpson38rule = results(srfGVSimp38Vol)

lablel.Caption = "土方量计算结果为:" + simpson38rule

所以object类型的simpsons38rule根本没有用上。

第二:

presults是关键字,用不着定义,所以

Dim presults As Double

这句话是多余的。


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/yw/11631036.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-17
下一篇2023-05-17

发表评论

登录后才能评论

评论列表(0条)

    保存