View unanswered posts | View active topics It is currently Fri Aug 22, 2014 11:45 am






Reply to topic  [ 2 posts ] 
Initializing structs upon declaration 
Author Message
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post Initializing structs upon declaration
I have since decided to implement this differently, but how (if possible) would I initialize a struct upon declaration? :)
Code:
typedef struct
{
    bool isFoo;
    bool isBar;
    int baz;
} structType;

structType newStruct; //<--assign values to members here

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Sun Jun 02, 2013 12:54 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3190
Location: Rotterdam, The Netherlands
Post Re: Initializing structs upon declaration
That is currently not possible in ROBOTC.

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sun Jun 02, 2013 1:10 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 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

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.