0

I am trying to create a dialog when a button is cicked. The function that is called when the button is clicked is this:

void clicked(){
const std::string title = "Title";
Gtk::Dialog *m_dialog(title, false);
}

I keep getting an error on the last line, where I create the Dialog.

The two errors I get are the following:

error: expression list treated as compound expression in initializer [-fpermissive]
error: cannot convert ‘bool’ to ‘Gtk::Dialog*’ in initialization

According to the gtkmm reference, the first parameter should be the title and the second should be boolean indicating if it should be a modal.

Does anyone know what I'm doing incorrectly?

Thanks!

foobar5512
  • 2,470
  • 5
  • 36
  • 52

1 Answers1

1

You probably intended

Gtk::Dialog m_dialog(title, false);

or

Gtk::Dialog *m_dialog = new Gtk::Dialog(title, false);
jeffmagill
  • 191
  • 1
  • 6