dimanche 2 avril 2017

Objective-C: Default constructors of structs

My problem is simple. I have an Objective-C header file (ViewController.h) and its corresponding implementation (ViewController.m). In my header, I define a structure, as such (view the image):

Image 1

Then, I also create an instance of this structure in my header file, saying:

struct Options _options;

I access this struct in my implementation.

The problem is, in my implementation file, I get the error "Call to implicitly deleted default constructor of 'struct Options'", as such:

Image 3

What did I do wrong??

Aucun commentaire:

Enregistrer un commentaire