Re: Issue with initialization of array of structures
I don't have any hard evidence to back this up, but I remember trying to define an array of structs like you are doing. I seem to remember that the following way solved the problem, but I don't have ROBOTC with me, nor do I have any example which to look back on. Perhaps you could tell me if it works.
I'm not sure why this would be the case, but I vaguely remember this working. Sorry if I'm wrong, and maybe someone else can give you a better answer.
_________________ sudo rm -rf /
Thu Jan 05, 2012 6:36 pm
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1023
Re: Issue with initialization of array of structures
I tried similar thing a while back and couldn't get it to work either. So I concluded RobotC doesn't support it. In your scenario, you probably want to enter your initializers into a text file and write RobotC code to open the file and read the info from it. It's more versatile anyway because you can reuse your program with another room configuration without changing code.
Thu Jan 05, 2012 6:49 pm
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1023
Re: Issue with initialization of array of structures
BTW, I did not look through your code carefully last time. But when looking it again, I found one issue with the following function:
Users browsing this forum: No registered users and 4 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum