本文介绍了一些奇怪的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我拿了旧代码并决定稍微修改它,我只是注意到

它根本没有编译,在服务器之一服务器之前(主要)

在系统中崩溃它工作正常(我确信我会记住那个)。


现在我收到此错误:

[me @smth kazkas] $ make

g ++ -Wall -ansi -pedantic -c pirma_lib.cpp

g ++ -Wall -ansi -pedantic -c pirma.cpp

pirma.cpp中包含的文件:2:

pirma_lib.h:13:`之前的语法错误(''

pirma.cpp:在函数`int main(int,const char **)'':

pirma.cpp:68:没有匹配函数来调用`Aibe :: toString()''

pirma.cpp:126:没有匹配函数来调用`Aibe :: toString()''

***错误代码1


停在/某处。


主要问题应该在这里:

pirma_lib.h:13:语法错误之前`('''


所以这里是:

#ifndef PIRMA_LIB

#define PIRMA_LIB


public:

Aibe();

Aibe(int arr [],int length);

Aibe(int item,...);

~Aibe();


bool isSubSet(const Aibe& other)const;

void toArray(int ** arr)const;

std :: string toString()const; //

< --------------

int length()const;

// void Sort();


为什么我不能再编译它的任何想法?可能出现问题

with std?

I took old code and decided to modify it a bit, and I just noticed
that it does not compile at all and before server one of severs (main)
crashed in the system it was working fine (I am really sure that I
remember that).

Now I am getting this error:
[me@smth kazkas]$ make
g++ -Wall -ansi -pedantic -c pirma_lib.cpp
g++ -Wall -ansi -pedantic -c pirma.cpp
In file included from pirma.cpp:2:
pirma_lib.h:13: syntax error before `(''
pirma.cpp: In function `int main(int, const char **)'':
pirma.cpp:68: no matching function for call to `Aibe::toString ()''
pirma.cpp:126: no matching function for call to `Aibe::toString ()''
*** Error code 1

Stop in /somewhere.

The main problem should be right here:
pirma_lib.h:13: syntax error before `(''

So here it is:
#ifndef PIRMA_LIB
#define PIRMA_LIB

class Aibe {
public:
Aibe();
Aibe(int arr[], int length);
Aibe(int item, ...);
~Aibe();

bool isSubSet(const Aibe &other) const;
void toArray(int **arr) const;
std::string toString() const; //
<--------------
int length() const;
//void Sort();

Any ideas why I can not compile it anymore? Could something be wrong
with std?

推荐答案





#include< string>


-

Jim Langston


这篇关于一些奇怪的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-28 03:02