Trying to get started with this but I'm having tutorial issues in Xcode

I’m trying to follow this tutorial in Xcode
when I get to the point of adding the initialise function line I get this error.

I think there is an error in the tutorial and it should read:

void initialise (const String& commandLine) override
    mainWindow.reset(new MainWindow (getApplicationName()));

I hope this helps!


Awesome, thank you!

@BBloxham1 the old approach is from when JUCE used ScopedPointer to hold heap-allocated types. The recommended approach is to use std::unique_ptr now for individual objects. If you scroll down in your Main.cpp, you’ll see a std::unique_ptr<MainWindow> mainWindow; member at the bottom.

You can learn how to use unique_ptr correctly here:

1 Like

We’ll get those tutorials updated, thanks.