Search:

Type: Posts; User: dotz02x

Search: Search took 0.01 seconds.

  1. Replies
    81
    Views
    23,168

    well im done with this whole thing thanks for all...

    well im done with this whole thing thanks for all the help you guys i got it working 100% no problems or anything thanks i learned a lot too.
  2. Replies
    81
    Views
    23,168

    hmm i believe its badwords because when i // it...

    hmm i believe its badwords because when i // it doesnt give me the double free error but i dont see where i deallocate it
  3. Replies
    81
    Views
    23,168

    well they are both array and yes they both are...

    well they are both array and yes they both are set to point to something. i had badwords point to a class of badwords which consist of two strings and then i have sentence point to an array of words...
  4. Replies
    81
    Views
    23,168

    okay so i get a double free fault at the end of...

    okay so i get a double free fault at the end of my program when i use the sentence.~Setence();
    destructor in my program and the destructor contains the following code:



    Setence::~Sentence()
    {...
  5. Replies
    81
    Views
    23,168

    all i have now is a double free error at the end...

    all i have now is a double free error at the end of my program when it asks if the user wants to end the program and if he answers true then it does but i get a double free or corruption error and i...
  6. Replies
    81
    Views
    23,168

    okay thank you i believe it is now fixed

    okay thank you i believe it is now fixed
  7. Replies
    81
    Views
    23,168

    void extend() { string *temparray = new...

    void extend()
    {
    string *temparray = new string[max_size*2];
    for(int i = 0; i < max_size; i++)
    {
    temparray[i] = sentence[i];
    }
    delete[] sentence;
    max_size = (max_size*2);
    sentence = new...
  8. Replies
    81
    Views
    23,168

    okay this is all within the class

    okay this is all within the class
  9. Replies
    81
    Views
    23,168

    when i try to cout

    when i try to cout << sentence[i]; in a loop to output each of the words for some reason it displays nothing now....
  10. Replies
    81
    Views
    23,168

    well okay i figured out that problem but... i...

    well okay i figured out that problem but... i have another problem and that is now my sentence array contains no data because the function is in the private section of a class.

    If i copy the...
  11. Replies
    81
    Views
    23,168

    but dont i have to deallocate all memory that has...

    but dont i have to deallocate all memory that has been allocated? or can i do that at the end of my program?
  12. Replies
    81
    Views
    23,168

    well the function is part of a class and sentence...

    well the function is part of a class and sentence is a private data
  13. Replies
    81
    Views
    23,168

    the code is set to a function so it can be called...

    the code is set to a function so it can be called more than once.
  14. Replies
    81
    Views
    23,168

    well this is the code i got going: string...

    well this is the code i got going:


    string *temparray = new string[max_size*2];
    for(int i = 0; i < max_size; i++
    {
    temparray[i] = sentence[i];
    }
    delete[] sentence;
    sentence = temparray;
  15. Replies
    81
    Views
    23,168

    well i have another problem now i get a double...

    well i have another problem now i get a double free error when i try to extend it more than once
  16. Replies
    81
    Views
    23,168

    but i have one question how do i access a private...

    but i have one question how do i access a private function declared in a class within a class?
    For example:


    class Test
    {
    private:
    int size;
    string * sent;
    void extend() const;
  17. Replies
    81
    Views
    23,168

    thats what i mean lasterlight hehe my mistake on...

    thats what i mean lasterlight hehe my mistake on my wording
  18. Replies
    81
    Views
    23,168

    Well, thanks for all the feedback but i found my...

    Well, thanks for all the feedback but i found my own way to attack this problem and it was by creating a temporary array that is doubled the size, copying the old array to new then deallocating the...
  19. Replies
    81
    Views
    23,168

    well, the only idea that came to my head is to...

    well, the only idea that came to my head is to reinitialize the array.

    array = new string[20];
    but i am not sure if that works.
  20. Replies
    81
    Views
    23,168

    how to double an array size?

    I was wondering how do i increase an array size.

    Example:

    string *array;
    array = new string[10];

    and I want to increase the elements in that array to 20 how can i go by attacking this...
Results 1 to 20 of 20