4
I can’t create vectors of new types in Juulia, they don’t work.
The example program is this:
# Meu tipo customizado
struct Job
id::Int64
order::Int64
time::Float64
end
#Aqui eu crio o vetor
v = Vector{Job}()
#crio jobs para inserir no vetor
j1 = Job(1,1,1.0)
j2 = Job(2,1,1.1)
j3 = Job(3,1,1.2)
#As linhas seguintes não funcionam
append!(v, j1)
append!(v, j2)
append!(v, j3)
v #Vetor ainda vazio
I tested the same logic with integers in place of Jobs and it just worked.