What is the problem int the code? I've got:
"error: expected primary-expression before 'j'"
#include <vector>
using namespace std;
void foo(vector<int>& v){  
}
int main()
{
   foo( vector<int> j);
   return 0;
}
What is the problem int the code? I've got:
"error: expected primary-expression before 'j'"
#include <vector>
using namespace std;
void foo(vector<int>& v){  
}
int main()
{
   foo( vector<int> j);
   return 0;
}
 
    
    This is invalid:
foo( vector<int> j);
because you just can NOT define a named variable in a function call....
you mean for sure
int main()
{
    vector<int> j;
    foo(j);
    return 0;
}
