Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: StGuru

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    2,592

    Re: several conceptual questions

    Aah, I understand now. Thank you very much.

    So the dynamic memory is used while the program is running, and I can delete it before the program ends, so while system("pause") is keeping the program...
  2. Replies
    5
    Views
    2,592

    Re: several conceptual questions

    Thanks for the reply.

    Because its the end of the program. How the compiler know to delete the memory for other variables for example?
  3. Replies
    5
    Views
    2,592

    several conceptual questions

    Hi!

    I want to ask you why when I write something in file it deletes everything inside.

    For ex.



    #include <iostream>
    #include <fstream>
  4. Replies
    6
    Views
    1,505

    Re: array of pointers to class

    Thanks for the replies.

    So &* makes no sense, right?

    And why I need to delete it? Doesn't it deletes automatically?
  5. Replies
    6
    Views
    1,505

    Re: array of pointers to class

    Oh.. I missed that. Thank you very much.



    Why my program is not working perfectly?


    Also is it same *& and &* ??
  6. Replies
    6
    Views
    1,505

    array of pointers to class

    Hello! I need help about this problem. I got 4 class, one base class 'Vozilo' (Vehicle), and derived classes 'Avtobus' (Autobus), 'Avtomobil' (Car), 'Kamion' (Truck).


    #include<iostream>...
  7. Replies
    8
    Views
    807

    Re: virtual base conceptual questions

    Thank you very much for the help.
    Yes I missed Copier (1,2,3) while copying the whole code.

    But in the first post with the keyword "virtual" there is not normal inheritance since the first object...
  8. Replies
    8
    Views
    807

    Re: virtual base conceptual questions

    Thanks for the replies. It really helped me.

    I got few questions more:

    Does the constructor allocates memory for the object of the class?

    For example. (if normal inheritance rules apply) :
    ...
  9. Replies
    8
    Views
    807

    Re: virtual base conceptual questions

    Thanks for the replies.


    So constructor do allocate memory for objects right?

    In this case the PoweredDevice is created by Copier directly, and then Scanner and Printer inherit the members...
  10. Replies
    8
    Views
    807

    virtual base conceptual questions

    Hello!

    I got few things that I do not understand about virtual bases.

    I got this code:


    class PoweredDevice
    {
    public:
  11. Replies
    56
    Views
    5,366

    Re: class constructor question

    Does it mean that the compiler does not create copy for the returning object since it already been copied (before passed by value as a parameter to a function and copy constructor called)?
  12. Replies
    56
    Views
    5,366

    Re: class constructor question

    I expect the copy constructor to be called three times, but its called 2 times. Why?
  13. Replies
    56
    Views
    5,366

    Re: class constructor question

    Thanks for the suggestions. Here is the code:

    #include <iostream>
    using namespace std;


    class test
    {
    int c;
  14. Replies
    56
    Views
    5,366

    Re: class constructor question

    Actually, you're right. I misunderstood the terms 'copy' and 'create' :-).

    I got an interesting problem.


    test func(test object)
    {
    return object;
    }
    test ob=func(ob1);
  15. Replies
    56
    Views
    5,366

    Re: class constructor question

    Here is the code that I worked with:



    #include <iostream>

    using namespace std;


    class test
  16. Replies
    56
    Views
    5,366

    Re: class constructor question

    I was doing a little research and find out when:

    I - When an object is created from another object of the same type if I define the copy constructor as (for ex. test ob=ob1):


    test(const test...
  17. Replies
    17
    Views
    2,357

    Re: protected member OOP question

    I noticed when I put class izvedena : public osnovna then the protected member test becomes again protected, but if I put private it becomes private inside the inherited class.
  18. Replies
    17
    Views
    2,357

    Re: protected member OOP question

    Thanks, it worked.
  19. Replies
    17
    Views
    2,357

    Re: protected member OOP question

    They are not accessible by any possible way? Is there any way that I can access them?
  20. Replies
    17
    Views
    2,357

    Re: protected member OOP question

    Thanks for the replies. And why when I put protected it works? Is it inherited like protected member?

    I got another question. Why the inherited class does not inherit the private members of the...
  21. Replies
    17
    Views
    2,357

    protected member OOP question

    I got one question about protected members.

    Here is the code:

    #include <iostream>

    using namespace std;

    class osnovna
    {
  22. Thread: pointer class

    by StGuru
    Replies
    7
    Views
    753

    Re: pointer class

    thanks for the reply laserlight. Usually when I go out of bond at some array, I got 13423432 number for the variable. In this case perfectly works, which is strange. Anyway, how to use that vector...
  23. Thread: pointer class

    by StGuru
    Replies
    7
    Views
    753

    Re: pointer class

    Ok, thank you. And you mean that by not defining how many objects should be used (pokazuvac=new objekat[20]) there could be memory overflow?? I think the compiler should prevent this stuff.
  24. Thread: pointer class

    by StGuru
    Replies
    7
    Views
    753

    Re: pointer class

    What is heap? Is it a large pool of unused memory ?
  25. Thread: pointer class

    by StGuru
    Replies
    7
    Views
    753

    pointer class

    I got one code:


    #include <iostream>
    using namespace std;

    class objekat
    {
    int test;
Results 1 to 25 of 82
Page 1 of 4 1 2 3 4


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center