Thursday, February 21, 2013

some small typos of program writings

1.

char a[10][256]={
"..",
"..",
...
".."
};  //dont miss the semicolon

2.

Node* node1,node2;  //wrong!!

Node *node1,*node2;

3.

int a[5]={1,2,3,4,5};
vector<int> b(a,a+5);  NOT b(a,a+4)

4.

pay attention to return type
and if it returns int, dont write return; write return -1 instead.

5.

if

else if   //not elseif

No comments:

Post a Comment