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

Search:

Type: Posts; User: seventhirty

Page 1 of 2 1 2

Search: Search took 0.05 seconds.

  1. Replies
    4
    Views
    973

    Re: Quick style question

    You're right, I still don't have that habit..
    So you're saying that a comment inside the class body, listing all the nonmember functions will suffice ?
    This example is kind of short, but what about...
  2. Replies
    4
    Views
    973

    Quick style question

    Hello everybody

    I am writing a Vector3D class( like you've never seen that one before.. : ) ) and I am providing it with some overloaded operators.



    class Vector3D
    {
    public:
  3. Re: two functions calling each other untill exit(0);

    thanks a lot for the replies : )
  4. two functions calling each other untill exit(0);

    Hello, everybody : )

    Is there something wrong with two functions calling each other untill one of them calls exit() or some similarto exit function?

    example 1:


    #include <iostream>

    void...
  5. Replies
    5
    Views
    1,598

    Conversion Operator

    Hello everybody : )

    I have a question about defining a conversion operator. Everywhere I look, there's an example of operator int() and I can't quite figure it out how it works for more complex...
  6. Replies
    1
    Views
    588

    Re: Which is preferable?

    I'm not sure how to answer your first question.. generally, you should try to avoid using global variables..



    It doesn't matter. You can use them both. Structs are basically classes.

    There...
  7. Replies
    4
    Views
    636

    Inheritance access control

    Hello, everybody! : )

    I have a question regarding a using declaration inside a body of a derived class.
    I tried compiling the following, thinking that it would result in a compile-time error, but...
  8. Replies
    6
    Views
    1,273

    Re: Quickie : vector's copy constructor

    Yeah! : )
    10x

    Ok, I have another question on the same topic:

    "If we provide no element initializers for an array of class type, then the default constructor is used to initialize each element....
  9. Replies
    6
    Views
    1,273

    Quickie : vector's copy constructor

    Hi everybody! : )

    I'm having a hard time answering an exercise question from "C++ Primer 4th ed.", here it is:

    Exercise 13.2: The second initialization below fails to compile. What can we infer...
  10. Re: Singleton class and static data members of the class type

    Thanks for the answers.

    Lindley, if I use the second approach that you mention, the one with the function getInstance, does that mean that everytime the user of the class wants to use some...
  11. Singleton class and static data members of the class type

    Hi : )

    Last night a had a really hard time trying to understand the singleton pattern for a class which has a data member, with the same type as the class itself:



    class Singleton
    {
    public:
  12. Replies
    8
    Views
    1,076

    Re: Confused about virtual functions

    thanks again, things are starting to become clearer. : )
  13. Replies
    8
    Views
    1,076

    Re: Confused about virtual functions

    thanks : )

    Just to make sure I got it right :

    virtual declaration in the base class matters only when calling the virtual function through a pointer or reference to an object ( no matter if...
  14. Replies
    8
    Views
    1,076

    Re: Confused about virtual functions

    Yes I read this just before posting..and in the book i'm reading and in several other articles.. It's all the same..

    please tell me in the code above, am I overloading the function or redefining...
  15. Replies
    8
    Views
    1,076

    Confused about virtual functions

    Hi everybody : )

    I have a C++ theory question:

    The purpose of a virtual function of a given class is to let the derived class to be able to redefine it right?
    I've tried something here:

    ...
  16. Re: error C2955: 'vector' : use of class template requires template argument list

    thanks a lot, removed the using declaration and added the std:: prefix and now it compiles.. didn't know that using declarations in a .h file is not a good idea..

    what you mentioned about...
  17. error C2955: 'vector' : use of class template requires template argument list

    hi everybody : )

    I am trying to create a music sampling application with VC++ 6.0 and SDL, but I have a strange issue in designing one of the classes. here's my header file code:



    #include...
  18. Replies
    13
    Views
    1,576

    Re: 2 quick newb questions

    Thanks a lot to you all, your answers were very helpful : )

    To make sure i got it right:

    When I substract two pointers, the expression yields the distance between them, but when I substract or...
  19. Replies
    13
    Views
    1,576

    2 quick newb questions

    Ok , so:

    1. As it is written in the book I'm reading on C++ - Primer 4th edition the division operator / has a higher precedence than the remainder operator %.

    So if I write the expression
    ...
  20. Replies
    1
    Views
    811

    quick newb class and header questions

    Hi

    I have two questions that are not answered in the book I'm learning c++ from:

    1. Is it a good idea everytime when I define a class to put all its methods in its body (inline), including the...
  21. Replies
    2
    Views
    3,461

    Re: SDL Timer problems

    I found it after reading more carefully.. (please excuse me for not doing it before posting...)

    It's not double buffering (it is a concern only for applications in full screen mode), its the lack...
  22. Replies
    2
    Views
    3,461

    SDL Timer problems

    Hi code gurus!

    I'm currentlu trying to make a tetris game, using MS Visual C++ 6.0 and SDL. My OS is Windows XP. I'm reading "Accelerated C++ " by Koeing and "Focus on SDL" by Pazera (both really...
  23. Replies
    2
    Views
    465

    quick newb question

    when i create a program that outputs a lot of lines i cannot see them all in the console..




    cin >> R;

    for (int x = -R; x <=R ; x++)
    for (int y=-R; y<=R; y++)
    if ( sqrt(x*x + y*y)...
  24. Re: my program compiles with no errors, but cant be executed

    thanks for the advice, i was ablo to execute the program when i made the matrix smaller..

    now it does nothing after i input a number...

    maybe i'll stab myself now.. or start learning.. will...
  25. Re: my program compiles with no errors, but cant be executed

    In MS Visual Studio 6:

    Build >> Start Debug >> Go" is that what you are talking about? it says : ".. stack overflow"
Results 1 to 25 of 26
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured