主题:结构体中可变数组问题
type job_info
INTEGER name
INTEGER,allocatable::children(:)
INTEGER parent
integer num_children
integer num_pro
integer level
end type job_info
。。。
type(job_info),allocatable::job(:),last_job(:)
。。。
allocate(job(m),last_job(m))
先将job中各个分量都赋值后,然后last_job=job
为了满足程序功能的需要,要对job中的children进行修改,但是我希望last_job的值不变,为什么last_job中的children也随之改变呢????
跪求高手指点迷津!多谢!!!!