This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
What can't I make a call in global scope?
- From: "孙宗君" <szj087 at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 5 Dec 2008 09:30:21 +0800
- Subject: What can't I make a call in global scope?
Why the following code is illegal?
#include <iostream>
#include <vector>
vector<int > vi;
vi.push_back(10); //why this line is illegal?
int ii = vi.at(0); // this line is legal??
int main()
{
return 0;
}
Appreciation for your kindly help/
Zongjun