I have a question and I do not know how to resolve it.
I have this array created:
var data: [(x: Double, y: Double)]
Trying to use it tells me it is not initialized.
You can tell me how to initialize it, I can not do it.
Thanks for the help.
I have a question and I do not know how to resolve it.
I have this array created:
var data: [(x: Double, y: Double)]
Trying to use it tells me it is not initialized.
You can tell me how to initialize it, I can not do it.
Thanks for the help.
The easiest thing is to initialize it empty in the same statement
var data: [(x: Double, y: Double)] = []
or if you want to give values, for example
var data: [(x: Double, y: Double)] = [(2.4, 3.5), (0.4, 5.5)]