error C2059 什么意思

发布网友 发布时间:2022-04-20 01:13

我来回答

3个回答

热心网友 时间:2023-09-07 12:38

C2059的错误表现有多种。

第一种:错误信息:error C2059: syntax error : )

第二种:错误信息:error C2059: syntax error : )

第三种:错误信息:error C2059: syntax error : ) 还会附带error C2143:。

第四种:刚开始,比较怪异,现象:

1、使用openssl库,在另一个工程里,ok,没问题。

2、在出问题工程里,不在.h文件出现 #include <openssl/*.h> ,ok,正常。

3、在出问题工程里,在.h文件出现 #include <openssl/*.h> 立即出现C2059错误。

ERROR.TYPE函数是:

office办公软件excel表格中的一种函数,ERROR.TYPE函数用于返回excel中某一错误值的代号,其语法结构为:ERROR.TYPE(error-val)。

ERROR.TYPE函数只有一个参数error-val,可以作为实际的错误值,但通常为一个单元格引用,若没有错误则返回#N/A。

以上内容参考:百度百科——ERROR.TYPE函数

热心网友 时间:2023-09-07 12:38

C2059的错误表现有多种。

第一种:错误信息:error C2059: syntax error : )

第二种:错误信息:error C2059: syntax error : )

第三种:错误信息:error C2059: syntax error : ) 还会附带error C2143:。

第四种:刚开始,比较怪异,现象:

1、使用openssl库,在另一个工程里,ok,没问题。

2、在出问题工程里,不在.h文件出现 #include <openssl/*.h> ,ok,正常。

3、在出问题工程里,在.h文件出现 #include <openssl/*.h> 立即出现C2059错误。

此时,在openssl路径配置正确情况下,在某一.h文件只写入

#include <openssl/pkcs12.h>

会出现error C2059: syntax error : constant   错误。

解决方案:

经仔细研究,对比,试验,发现,openssl的头文件有顺序之分。加入下面句子,即正常。

#include <openssl/buffer.h>
#include <openssl/err.h>
#include <openssl/rand.h>

根据经验,这是一例头文件互耦比较严重的问题,遇到此种情况,需调整.h文件

出现序列即可解决此类C2059问题。

扩展资料:

ERROR.TYPE函数是office办公软件excel表格中的一种函数,ERROR.TYPE函数用于返回excel中某一错误值的代号,其语法结构为:ERROR.TYPE(error-val)。

ERROR.TYPE函数只有一个参数error-val,可以作为实际的错误值,但通常为一个单元格引用,若没有错误则返回#N/A。

参考资料:百度百科-ERROR

热心网友 时间:2023-09-07 12:39

一日遇到C2059错误,google搜索发现C2059的错误表现有多种。
这里整理一些以及自己遇到的情况,供大家借鉴解决。
第一种:
int main )
{
}
它会引起C2059错误,错误信息:error C2059: syntax error : )
第二种:
#include <stdio.h>
#define TEST
int main(int argc, char* argv[])
{
#ifdef TEST
printf(\nTEST defined %d, TEST);
#else
printf(\nTEST not defined);
#endif

return 0;
}
它也会引起C2059错误,错误信息:error C2059: syntax error : )
另外一种:
struct ag_type
{
int a;
float b;
};
void func(ag_type arg = {5, 7.0});
它也会引起C2059错误,错误信息:error C2059: syntax error : ) 还会附带error C2143:。

第三种,也是本人遇到的,

刚开始,比较怪异,现象:

1 使用openssl库,在另一个工程里,ok,没问题。

2 在出问题工程里,不在.h文件出现 #include <openssl/*.h> ,ok,正常。

3 在出问题工程里,在.h文件出现 #include <openssl/*.h> 立即出现C2059错误。

此时,在openssl路径配置正确情况下,在某一.h文件只写入

#include <openssl/pkcs12.h>

会出现error C2059: syntax error : constant 错误。

解决:

经仔细研究,对比,试验,发现,openssl的头文件有顺序之分。加入下面句子,即

正常。

#include <openssl/buffer.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#include <openssl/conf.h>
#include <openssl/bio.h>
#include <openssl/objects.h>
#include <openssl/asn1.h>
#include <openssl/pem.h>
#include <openssl/evp.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
#include <openssl/pkcs12.h>

根据经验,这是一例头文件互耦比较严重的问题,遇到此种情况,需调整.h文件

出现序列即可解决此类C2059问题。
声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。
E-MAIL:11247931@qq.com