Search:

Type: Posts; User: CppProgrammer88

Search: Search took 0.01 seconds.

  1. But, if the delete invokes the destructor of the...

    But, if the delete invokes the destructor of the object the pointer points to and destroys that object, then it will also destroy the data and pointer in the object too, since the object is...
  2. How does this code destruct the linked list class?

    In the book Jumping Into C++, chapter 25, (page 360-370) we have these codes as examples:



    class LinkedList
    {
    public:
    LinkedList (); // constructor
    ~LinkedList ();...
  3. How to Add N number if nodes to a Linked List using iteration? (chap 16, exercise 3)

    Hi,

    I have a little program where you can add N number of nodes to a linked list, with values from 1 to N, and then it prints these values from 1 to N.

    Then it asks you how much of the list you...
  4. I don't know how the author or some experienced...

    I don't know how the author or some experienced programmer would solve this exercise.

    What I tried to do is to:
    1. put a random walls into a two-dimensional array.

    2. make some changes so...
  5. I know, it just prints some X's. More code could...

    I know, it just prints some X's. More code could make it possible to make the program generate an image, where every X is a picture of a wall, and every space is just a space.

    I added this note to...
  6. Jumping into C++ Chapter 14, exercise 6.

    Hi, in Jumping into C++, chapter 14, exercise 6 asks for building a maze, and then ensuring that it has a valid path.

    Building a maze is simple, here's the code:


    #include <iostream>
    #include...
Results 1 to 6 of 6