|
-
September 27th, 2005, 04:04 PM
#1
scope
Code:
struct card {
bool l;
};
bool pair(card[] cards) {
return true;
}
here i get the error: expected primary-expression before ']' token
why is this?
-
September 27th, 2005, 04:09 PM
#2
Re: scope
change
bool pair(card[] cards)
into
bool pair(card cards[])
**** **** **** **** **/**
-
September 27th, 2005, 04:10 PM
#3
Re: scope
you just have the [] in the wrong location ...
Code:
bool pair(card cards[]) {
return true;
}
-
September 27th, 2005, 04:10 PM
#4
Re: scope
The parameter declaration "card[]" is invalid. The array indicator is in the wrong place:
Code:
bool pair(card cards[])
Viggy
-
September 27th, 2005, 04:11 PM
#5
Re: scope
Now that's pretty funny (2 responses at the same time; 1 minute late)!
Viggy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|