No, the :: (scoping) operator cannot be used as you describe.
Your creation of the array a is illegal in C++, anyway, so it's a moot point that you can't access it directly from f1(). And main() returns int.
In C++, I'd use this (assuming f1() does not intend to change the passed information);
Code:
#include <vector>
#include <iostream>
void f1(const std::vector<std::vector<int> > &);
int main()
{
int r,c;
std::cin >> r >> c;
std::vector<std::vector<int> > a(r, std::vector<int>(c));
f1( a);
}
void f1(const std::vector<std::vector<int> > &a)
{
// use a here
}
This is legal, as vectors carry their size information with them .... and so do vectors of vectors.