Need help for string *my_array_of_strings
I have this private array;
string *my_array_of_strings;
On main I have ;
my_array_of_strings = new string[15];[/code]
Ok, I pass this array to :
1 2 3
|
get_data(int from, int to, string * array_string){
array_string[x] = "blah blah";
etc ....
|
I have a txt_editor in which I show these lines of text. On a resize event I calc the line_max and re-create the array
1 2
|
delete [] my_array_of_strings;
my_array_of_strings = new string[line_max];
|
I have and error on delete , why ?
( I know that I coould to use vector but I want to understand arrays... )
Thanks in advance
I have and error on delete , why ? |
You shouldn't. It looks right to me.
What is the error?
Segmentation fault .....
I dont understand why ....
I have an error even If I want to output the [0] value
output << array_string[0];
I review the compiler error and I see :
0xa0007078 <Address 0xa0007078 out of bounds>
What can be happen ?
mmmm
I think that it was a problem with another array bad sized.
Sorry.
Topic archived. No new replies allowed.