function const

Why do we use const with functions .

int getA() const {}
int getA() {}

whats the difference
Topic archived. No new replies allowed.