Search:

Type: Posts; User: kitten

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    10,524

    Golem, well I didn't remember that one :D

    Golem, well I didn't remember that one :D
  2. Replies
    4
    Views
    10,524

    You can initialize all the elements of array with...

    You can initialize all the elements of array with the same value, but you can't input different values to the constructor when creating array. If you need different values in objects in array, you...
  3. Thread: polymorphism

    by kitten
    Replies
    10
    Views
    1,379

    oh sigh, it is easier to point you a good...

    oh sigh, it is easier to point you a good tutorial that write here n pages of text. :D
    So here you go: http://firstpod.tripod.com/cpp21/ and chapter 12 and 13. It's really a good tutorial, nothing...
  4. Replies
    1
    Views
    2,070

    There is no such way in graphic modes, because...

    There is no such way in graphic modes, because graphic modes don't have text lines. So the way to clear text is to draw a rectangle with background color to cover it.
  5. Replies
    1
    Views
    1,119

    NULL doesn't really mean anything else but a...

    NULL doesn't really mean anything else but a pointer with value of zero. This generally indicates that the pointer isn't pointing to anywhere.

    A pointer is an address to an object in memory. So if...
  6. Replies
    5
    Views
    805

    Whopsey... I missed the point in the question :D

    Whopsey... I missed the point in the question :D
  7. Replies
    11
    Views
    2,423

    It's definately not pascal code. I've written...

    It's definately not pascal code. I've written pascal some 5 years ago. Pascal's more C-like language.
  8. Replies
    5
    Views
    805

    getch() in

    getch() in <conio.h>
  9. Replies
    36
    Views
    2,495

    Winterwolf: If you want to use an array in a...

    Winterwolf:

    If you want to use an array in a function where it isn't visible, you must give a pointer to the array for the function. Then you can use the entire array via pointer. The pointer...
  10. Replies
    36
    Views
    2,495

    Winterwolf> nononononoo! No code in header! :) ...

    Winterwolf>
    nononononoo! No code in header! :)

    Put your class definition in header:

    class Monster
    {
    // whatever
    };
  11. Replies
    36
    Views
    2,495

    Yes it is :D

    Yes it is :D
  12. Replies
    36
    Views
    2,495

    Array with classes is done exactly the same way...

    Array with classes is done exactly the same way you would do array with structs. In a matter of fact only difference between struct and class is that default visibility is public in struct and...
  13. Replies
    3
    Views
    986

    Ok, you can easily test if a floating point...

    Ok, you can easily test if a floating point variable has desimal numbers.

    if (Variable == (int)Variable) // test if there is no desimals
    if ( !(Variable == (int)Variable) ) // test if there are...
  14. Replies
    36
    Views
    2,495

    Well, nobody prevents you from making your...

    Well, nobody prevents you from making your variables public, and it's not illegal or something :) Making them private is just a commonly used method because it's safer and more bug free.

    ....Thanx...
  15. Oh yeah... I forgot that :D

    Oh yeah... I forgot that :D
  16. There is no desimals in integer... period:)

    There is no desimals in integer... period:)
  17. Replies
    36
    Views
    2,495

    Accessing class' variables via set and get...

    Accessing class' variables via set and get functions is a common way to do it. And there is no other good way if the variables are private (like they should always be). So examples of accessor...
  18. Replies
    1
    Views
    851

    Inline functions should be written in header...

    Inline functions should be written in header files. Usually every function is in its own "code region" and when the function is called its parameters are put into the stack and program's execution...
  19. Replies
    4
    Views
    5,088

    Wrong! There sure is possible solution. Look at...

    Wrong! There sure is possible solution. Look at this:


    const int Xsize = 20;
    const int Ysize = 30;
    const int Zsize = 80;

    char ***3DArray;

    // Allocating array:
  20. Replies
    1
    Views
    1,582

    DirectX is more difficult that OpenGL. But if you...

    DirectX is more difficult that OpenGL. But if you want your software to work in any Windows then DirectX is your choice. There is also various graphics libraries that can give you 13h mode, such as...
  21. Replies
    2
    Views
    1,020

    Look for the links in this board's FAQ... There...

    Look for the links in this board's FAQ... There is a few good ones.
  22. Replies
    4
    Views
    898

    Nope... lworlds::~lworlds() { delete name;...

    Nope...

    lworlds::~lworlds() {
    delete name;
    }

    // should be:

    lworlds::~lworlds() {
    delete [] name;
  23. Replies
    8
    Views
    4,150

    // defined MyErrorCode class: class...

    // defined MyErrorCode class:

    class MyErrorCode
    {
    public:

    MyErrorCode(const char* Msg) : ErrorMessage(Msg) {}

    void PrintError(void) { cout << MyErrorCode; }
  24. Replies
    4
    Views
    1,600

    DirectSound can handle things like that... I...

    DirectSound can handle things like that... I don't know anything about DS though :D
  25. Replies
    5
    Views
    1,071

    Do you close the file after you've finisher...

    Do you close the file after you've finisher reading/writing it? The OS won't open same file twice a row.
Results 1 to 25 of 109
Page 1 of 5 1 2 3 4