WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
This repository was archived by the owner on Jan 8, 2020. It is now read-only.
This repository was archived by the owner on Jan 8, 2020. It is now read-only.

Changes values?  #5

@moelski

Description

@moelski

Hi !

I place some structs inside my List:

struct MenuEntry {
  EntryType Type;
  short     CountId;
  short     GroupId;
  short     ParentId;
  short     SubmenuId;
  String    MenuText;
  bool      ValueBool;
  int       ValueInt;
};

Example:
Menu->add((MenuEntry) {EtText, 0, 1, -1, -1, "MainMenu" , false, 0});

Can you tell me how to change a value inside the struct?
If I try to change the ValueBool I get this error:
using temporary as lvalue [-fpermissive]

My code for changing the value looks like this:
Menu->get(0).ValueBool = true;

Any hint would be much apprechiated. Thx.

Dominik

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions