"no match function for call to 'count'

So for some reason in this program:
main.cpp:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include <iostream>
#include <vector>

using namespace std;

vector<int> highs;
vector<int> lows;
vector<int> voluem;
vector<int> close;
vector<int> open;
int userInput, numInputs;

int main()
{
cout << "input number of numbers:\n";
cin >> numInputs;
cout << "lets get the lows and highs\n";
for (int i = 0; i < numInputs; i++)
          {
          cout << "input high:\n";
          cin >> userInput;
          highs.push_back(userInput);
          cout << "input low:\n";
          cin >> userInput;
          lows.push_back(userInput);
          cout << "imput voluem:\n:";   
          cin >> userInput;
          voluem.push_back(userInput);
          cout << "imput close:\n:";   
          cin >> userInput;
          close.push_back(userInput);
          cout << "imput open:\n:";   
          cin >> userInput;
          open.push_back(userInput);
          }
     cout << "proccesing\n";


     cout << "finished\n";

}
void va()
{
     int sum = 0;
     int volaverage;
     int q1 = 0;
     for (q1=!numInputs;  q1++;)
     {
             voluem.at(q1)+=sum;
     }
     if(q1=numInputs)
     {
                     volaverage = sum/numInputs;
     }
}


algs.cpp:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

extern vector<int> highs;
extern vector<int> lows;
extern vector<int> voluem;
extern vector<int> close;
int m1;
extern int numImputs = m1;


void tube()
{
     int xcount[1000];
     int ycount[1000];
     int q = 0;   
     while(q =! m1)
     {
            xcount[q] = (int) count(highs.begin, highs.end, highs.at(q));  
             q++;
             
     }
}


whenever I call a algorithm like sort or count I get the error: algs.cpp no matching function for call to `count(<unknown type>, <unknown type>, int&)'
Also previously in the same area I was getting errors like:
'begin' was not declared..., referring to highs.begin. I would probably bet these were related but these errors magically went away for some reason.


Thank you in advanced.


 
            xcount[q] = (int) count(highs.begin(), highs.end(), highs.at(q));

I haven't looked for any other errors.
That worked.
Thank you, don't know why I didn't see that.
Topic archived. No new replies allowed.