Sort function error c++

I have a function sort
1
2
3
 Sort(vector<int>A, vector<int>B, int n)
{
.....

and it is works fine. In main program i have
1
2
3
4
5
6
int main(int argc, const char* argv[]) {
    vector<int> A;
    vector<int> B;
    vector<int> C;
...
Sort(A, B, n);

but i have a little problem in the main program, when i call the function i have this error: Use of undeclared identifier 'n', and when i try to declare it in main program, then function doesn't work..Does someone know what's the problem and how to fix this?
and when i try to declare it in main program, then function doesn't work.

"Doesn't work" is the most useless problem description there is. Tell us clearly, precisely and completely what behaviour it is that you're seeing, and how that behaviour differs from what you expect to see.

Also, it's likely that we won't be able to help fix the problem without seeing the actual code of your function.

EDIT: I notice you were told more or less exactly the same things in the last thread you posted. Why are you failing to learn from the help you're being given here?
Last edited on
I solved the problem.. I have problems with vectors and i am trying, but sometimes there are things i can't solve
None of my comments were about vectors, or about solving coding problems at all. They were about how you ask questions.
Topic archived. No new replies allowed.