In reply to Ammu4392:
Did you forget to do something like this before assigning the values?
cores=new[10];