Skip to content

Initializing values outside of a function doesn't appear to work #4

@paulrouget

Description

@paulrouget
static int m_count = 0;

void test() {
  print(m_count);
}

m_count contains garbage. I need to add an init function to initialize all the global values.

static int m_count;

void init() {
   m_count = 0;
}

void test() {
  print(m_count);
}

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