compiler error: Error C2660: find does not support 3 parameters 
Author Message
 compiler error: Error C2660: find does not support 3 parameters

Hi,
I am using MSVC++ 6.0. There is an error message when I compile a very
simple C++ program. It says 'find' does not support 3 parameters:

#include <string>
#include <algorithm>
using namespace std;

main()
{
  tree<string> a;
  ...

  find(a.begin(), a.end(), "abc");
  ...

Quote:
}

Dun know how to solve the problem. Some complier options ?

thanks in advance
li xin



Tue, 03 May 2005 20:52:59 GMT  
 compiler error: Error C2660: find does not support 3 parameters

Quote:
>Hi,
>I am using MSVC++ 6.0. There is an error message when I compile a very
>simple C++ program. It says 'find' does not support 3 parameters:

>#include <string>
>#include <algorithm>
>using namespace std;

>main()

Implicit int has never been valid C++ - I think VC7 might even refuse
to compile it. certainly all of the other compilers I have reject the
program:

main() {}

requiring

int main(){}

as the minimum allowable program.

Quote:
>{
>  tree<string> a;

What is tree?

Quote:
>  ...

>  find(a.begin(), a.end(), "abc");
>  ...

>}

>Dun know how to solve the problem. Some complier options ?

The following program compiles fine.

#include <string>
#include <algorithm>
#include <list>
using namespace std;

int main()
{
  list<string> a;
  find(a.begin(), a.end(), "abc");  
  return 0;

Quote:
}

Without seeing your whole program (and what "tree" is) it is
impossible to work out what is wrong with it.

Tom



Tue, 03 May 2005 21:38:03 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Incorrect Reporting of Compiler Error C1083: File not found

2. Help with compiler error: fatal error LNK1169: one or more multiply defined symbols found

3. could not execute: path not found(Win32 error 3)

4. VC++6.0/SP3 Compiler Error: INTERNAL COMPILER ERROR

5. VC7 does NOT support template-template parameters involving non-type parameters

6. VisualC++.NET: errors C2144, C2660 & C2059

7. #import, compile error C2660

8. error C2660

9. Unexplained C2660 errors

10. Compiler/linker errors when adding support for ADOCE smart pointers

11. template parameter type internal compiler error

12. Error C2660: 'QueryInterface' : function does not take 1 parameters

 

 
Powered by phpBB® Forum Software