Homepage

Acknowledgements

This book would not have been possible without Bob Nystrom’s Crafting Interepreters. This book can be seen a seen as a companion piece to it to show how a similar implementation can be made using c++.

I mainly use struct instead of classes to make it easier to follow along and to make it easier to write as I was going and not have to worry about private/public access. One thing I didn’t have to think about.

  • #include <vector>
    
    struct example {
       int a;
       float b;
       void example() {
           return;
       }
    }
    
    //this is a comment
    
    
    int main(){
    
        std::vector<int> myvec{1,2,3,4,5,6,7,8,9,1,2,3,4,5,
                               6,7,8,9,1,2,3,4,5,6,7,8,9};
    }
    
  • this is an example of some code that we will want to talk about