View unanswered posts | View active topics It is currently Sat Sep 26, 2020 3:46 pm

Reply to topic  [ 1 post ] 
Cannot Initialize a structure 
Author Message

Joined: Mon Dec 01, 2014 4:27 am
Posts: 5
Post Cannot Initialize a structure
1) If you are getting an error, please tell us what error you are getting and what he message says.
typedef struct type_u {
  int b;
} type_u;
typedef struct type_t {
  int a;
  type_u u;
} type_t;

type_t var_t = {
 /* .a = */ 1,
 /* .u = */ { 2, },

When compiling, got the following error message:
*Warning*:Invalid '=' operation for types 'type_t' and 'char'
*Warning*:Invalid '=' operation for types 'type_t' and 'char'

2) Give us the version of ROBOTC you're using
4.55 (9110) (F/W 10.55)

3) Give us the platform type (NXT, VEX CORTEX, etc.)

4) Describe the issue as best as you can
Compiler is not aware of allocating and initializing a static structure

5) Give us steps on how to reproduce the problem
Use code provided and compile

6) Provide a screenshot if it applies

7) Tell us the operating system you are using
Windows 10

Mon Nov 14, 2016 1:16 am
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

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.