0

The following code has an error as noted, please help in this regards.

typedef enum L3 {e_s, e_off,e_on};
struct L
{
    L3 List3;
    float value;
    int MT_ID;
};

list <L> eventlist1;

L rr={e_s,1.3,3};

eventlist1.push_back.(rr);   // here is the error 
Ivan Aksamentov - Drop
  • 12,860
  • 3
  • 34
  • 61
nasser
  • 19
  • 1

4 Answers4

0

I think you have a typo: eventlist1.push_back.(rr) (you need to remove the dot between back and (rr)
Correct it to eventlist1.push_back(rr);

lolando
  • 1,721
  • 1
  • 18
  • 22
0

You have syntactic error in your code. Use IDE, to check for syntax errors even before compilation.

Community
  • 1
  • 1
Ivan Aksamentov - Drop
  • 12,860
  • 3
  • 34
  • 61
0

eventlist1.push_back.(rr); ==> shouldn't this be eventlist1.push_back(rr);

aswani521
  • 317
  • 4
  • 13
0
typedef enum L3 {e_s, e_off,e_on};
struct L
{
    L3 List3;
    float value;
    int MT_ID;
};

list <L> eventlist1;

L rr={e_s,1.3,3};

eventlist1.push_back(rr);   // push_back(VALUE)

Reference C++98/C++11 : http://www.cplusplus.com/reference/list/list/push_back/

Sahil Sareen
  • 1,813
  • 3
  • 25
  • 40