hi to all ok this is my problem. Im`m learning to program by my own so i have a little issue woth memory that i cannot figure out so im asking for a little help here... the program that i am triing to build is a program that ask the user to imput an array size then the program must create this array, filling with random integers and output it in screen. it compiles ok right now but when i run boxes to compile appear or error box when number imput its > 5 if it its 1 it runs without problems. you`l undertand better if you try and run it.. thx in advance
1) The size of the array you make goes from 0 - (size - 1), so in your for loop you want to loop from i = 0; i < size; only
2) If you want to use new to make an array, you must use [ ], not ( ): bobby = newint[numero];
3) If you change the above then your delete [] bobby; should work.