Skip to content

Classes in A++

Classes in A++ provide a way to create objects that bundle data and functionality together. This guide will walk you through the basics of working with classes in A++.

Basic Class Structure

a++
class Person {
    // Properties
    string name
    int age

    // Constructor
    fn init(string name, int age) {
        this.name = name
        this.age = age
    }

    // Methods
    fn sayHello() {
        print("Hello, my name is " + this.name)
    }
}

More content coming soon...

This documentation is under development. Check back later for more detailed information about:

  • Class inheritance
  • Access modifiers
  • Static members
  • And more...

Released under the MIT License.