Search:

Type: Posts; User: thames

Search: Search took 0.01 seconds.

  1. Replies
    21
    Views
    6,174

    Thank you for saving me Elysia! I'm starting C++...

    Thank you for saving me Elysia! I'm starting C++ Primer 5th edition
  2. Replies
    21
    Views
    6,174

    do you mean, almost never ? c'mon, why do they...

    do you mean, almost never ?
    c'mon, why do they write books like that then? :frown: I read the ACCU review from your link. It was very disappointing because everything that is written is true.
  3. Replies
    21
    Views
    6,174

    I read this review before. ...

    I read this review before.

    I'm almost at the end of Stephen Prata's book (page 830). :frown: At least, I've been learning some principles of C++. He has been using char* and char[] a lot, I...
  4. Replies
    21
    Views
    6,174

    wha? can you show me a code snippet?

    wha? can you show me a code snippet?
  5. Replies
    21
    Views
    6,174

    I fixed white. Many thanks! Cd::Cd() { ...

    I fixed white. Many thanks!



    Cd::Cd()
    {
    performers = new char[1];
    performers[0] = '\0';
    label = new char[1];
    label[0] = '\0';
  6. Replies
    21
    Views
    6,174

    how should I do this when it comes to that case,...

    how should I do this when it comes to that case, dynamic memory allocation? I used gdb and I think there's garbage inside performers and label when the object is created:



    Classic copy;

    ...
  7. Replies
    21
    Views
    6,174

    whiteflags can you tell me if I need to define...

    whiteflags can you tell me if I need to define code for those default constructors ?



    Classic() {}
    Cd() {}


    edit:
  8. Replies
    21
    Views
    6,174

    Stephen Prata coded the operator function that...

    Stephen Prata coded the operator function that way to get rid of the old data for new memory allocation. After all, I'm renewing the memory space, right?
  9. Replies
    21
    Views
    6,174

    but whiteflags I've been writing the overloaded...

    but whiteflags I've been writing the overloaded operator = that way for another programs and it has been working just fine:



    #ifndef DMA_H_
    #define DMA_H_
    #include <iostream>

    class...
  10. Replies
    21
    Views
    6,174

    Overloaded assignment

    Good evening.



    thames@semaht ~/C++/Projects/Disks $ g++ -g -Wall maindisk1.cpp disk1.cpp -o maindisk1 -std=c++11
    thames@semaht ~/C++/Projects/Disks $ valgrind ./maindisk1
    ==2721==...
Results 1 to 10 of 10