Created
October 25, 2013 03:27
-
-
Save cztchoice/7149044 to your computer and use it in GitHub Desktop.
test name type error, like error: ‘...’ does not name a type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<vector> | |
std::vector<int> b; | |
//This does not name a type | |
//b.push_back(1); | |
int c[10]; | |
//This does not name a type too | |
//c[0] = 1; | |
int main() | |
{ | |
std::vector<int> a; | |
a.push_back(1); | |
//Here is ok | |
b.push_back(1); | |
//Here is ok, too | |
c[0] = 1; | |
int d[10]; | |
d[0] = 1; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment