Search:

Type: Posts; User: Shafiul

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Alright.

    Alright.
  2. Thank you very much for your answer. Appreciated....

    Thank you very much for your answer. Appreciated. However, wondering part is, why is the if(arr) expression returning a true value!. It should not return a true value after executing free(ptr). Sorry...
  3. Why does the statement if(arr) free(arr); still executing?

    Hello everyone, I have a heap allocated array arr. The allocation in arr is freed by using a pointer ptr. Therefore, if(arr) statement should return a false value. But practically it returns a true...
  4. Replies
    12
    Views
    439

    Thanks Hamster_nz. Thanks Jona.

    Thanks Hamster_nz. Thanks Jona.
  5. Replies
    12
    Views
    439

    Is there any way to free up the entire allocated...

    Is there any way to free up the entire allocated space which was allocated inside a function of create_numbers?
  6. Replies
    12
    Views
    439

    Thanks once again for your help. I am just afraid...

    Thanks once again for your help. I am just afraid to ask, does free(numbers) actually free the first element of result array or all the elements?
  7. Replies
    12
    Views
    439

    Meanwhile I am also sorry for my poor coding...

    Meanwhile I am also sorry for my poor coding style. I will try to improve in near future.
  8. Replies
    12
    Views
    439

    Super useful. Thanks Amanda.

    Super useful. Thanks Amanda.
  9. Replies
    12
    Views
    439

    Hi Amanda, Nice to see your feed back. I wrote a...

    Hi Amanda, Nice to see your feed back. I wrote a sample program for one test case. However, for some reason, I can not declare the array or allocate a pointer with a specific size in the main...
  10. Replies
    12
    Views
    439

    A weird question

    Is there any way to declare an array inside main function but initialization of this array will be into another function (out of main function)?. If possible, after initialization, is there any...
  11. Replies
    4
    Views
    842

    Thanks Amanda for a nice explanation. Now It is...

    Thanks Amanda for a nice explanation. Now It is clear to me. Thanks again.
  12. Replies
    4
    Views
    842

    Hi Malcolm, thanks for the answer. If I want to...

    Hi Malcolm, thanks for the answer. If I want to share the updated value of object owned by main to the object owned by class A, what should I do?
  13. Replies
    4
    Views
    842

    Request for help

    #include <iostream>
    using namespace std;

    class B
    {
    public:
    int value;
    B(){
    value = 10;
    }
  14. Thanks Laserlight.

    Thanks Laserlight.
  15. Thanks Rstanley.

    Thanks Rstanley.
  16. Why does this little code consume extra bytes of memory?

    In the following program, the structure object nd[0] node consumed 8 bytes of memory. Ideally, nd[0] should consume 5 bytes of memory in total. I mean, 4 bytes for Int type + 1 byte for the char...
  17. Sorry for that.

    Sorry for that.
  18. Do you have any recommendation regarding the consistency of UML diagram and code?

    Hello Everybody,
    I have translated the following class diagram (click on the link below) into c++ code. This is my early stage experience indeed for such an implementation from UML class diagram. I...
  19. Replies
    2
    Views
    681

    UML class diagram to code translation

    Hello Everybody,
    I have translated the following class diagram (click on the link below) into c++ code. This is my early stage experience indeed for such an implementation from UML class diagram. I...
  20. Hi Laserlight, I performed a simple...

    Hi Laserlight,
    I performed a simple test to compare the performance speed on malloc() and vector<>. I would like to share with you. The taste case was on a 2D array with 1000x1000 with...
  21. Dear Laserlight, I would like to...

    Dear Laserlight,
    I would like to share a bit details idea on my implementation. For instance, I have a data source in file, i have a matrix.cpp and vector.cpp. actually matrix (2d array)...
  22. Dear Laserlight, A quick question. How...

    Dear Laserlight,
    A quick question. How do you define ex-tern template function inside of AllocateVector.h for createData1D() to avoid the recompilation of the same function. Because...
  23. Dear Laserlight, Thanks for your...

    Dear Laserlight,
    Thanks for your explanation, nice of you though. your code looks very impressive and modern. I do feel, I still may need sometime to go through c++ from c. But...
  24. How can I prevent the duplication of stdlib.h in main.cpp?

    How can I prevent the duplication of stdlib.h in main.cpp?




    // AllocateVector.h
    #ifndef ALLOCATEVECTOR_H
    #define ALLOCATEVECTOR_H
    #include <stdlib.h>
  25. Thread: Need Help

    by Shafiul
    Replies
    18
    Views
    695

    you can try this header. hope, it should work

    you can try this header. hope, it should work
Results 1 to 25 of 34
Page 1 of 2 1 2