|
-
September 25th, 2010, 09:23 PM
#4
Re: Call Array Member in function Help
 Originally Posted by M2W
Anyway, I have changed my definition to match the declaration like you suggested. Mainly:
Code:
void function_one(Nodes Block) {
Block[].number = 1;
However, now it gives me an error telling me that Block[].number = 1 is expecting an argument (inside [] I suppose).
Yes, of course. As I wrote in my previous post:
 Originally Posted by Eri523
[...] you would have to access its sole member as Block.number inside the function.
An empty [] only makes sense in a declaration. (Well, there actually are other contexts where this construct is used as well, but I think I'll ignore them here for simplicity.)
And I hope the missing curly brace at the end of the function definition in both your posts is merely a copy-past failure.
Last edited by Eri523; September 25th, 2010 at 09:25 PM.
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
|