Another Stupid Newbie Question

Discussion in 'C++' started by Ed Dana, Jan 29, 2007.

  1. Ed Dana

    Ed Dana Guest

    Maybe my brain's just tired, or maybe the book I'm reading from is just
    crap, but... how do I do this Java reference in C++?

    int tmpVal = this.getValue( );

    Thanks in advance.

    Ed.
    Ed Dana, Jan 29, 2007
    #1
    1. Advertising

  2. On Jan 29, 7:23 am, Ed Dana <> wrote:
    > Maybe my brain's just tired, or maybe the book I'm reading from is just
    > crap, but... how do I do this Java reference in C++?
    >
    > int tmpVal = this.getValue( );


    I suppose you meant the this.getValue()-part, which in C++ would be
    this->getValue() since this is a pointer and not a reference.

    --
    Erik Wikström
    =?iso-8859-1?q?Erik_Wikstr=F6m?=, Jan 29, 2007
    #2
    1. Advertising

  3. Ed Dana

    Ambar Shukla Guest

    On Jan 29, 6:23 am, Ed Dana <> wrote:
    > Maybe my brain's just tired, or maybe the book I'm reading from is just
    > crap, but... how do I do this Java reference in C++?
    >
    > int tmpVal = this.getValue( );
    >
    > Thanks in advance.
    >
    > Ed.


    "this" is a pointer, so you need to use the "->" operator instead of
    "."
    Try int tmpVal = this->getValue( );

    Else directly:
    int tmpVal = getValue();

    Not quite sure why you are using "this"...


    Cheers,
    Ambar Shukla.
    Ambar Shukla, Jan 29, 2007
    #3
  4. Ed Dana

    Ed Dana Guest

    Ambar Shukla wrote:
    >
    > On Jan 29, 6:23 am, Ed Dana <> wrote:
    >
    >>Maybe my brain's just tired, or maybe the book I'm reading from is just
    >>crap, but... how do I do this Java reference in C++?
    >>
    >>int tmpVal = this.getValue( );
    >>
    >>Thanks in advance.
    >>
    >>Ed.

    >
    >
    > "this" is a pointer, so you need to use the "->" operator instead of
    > "."
    > Try int tmpVal = this->getValue( );
    >
    > Else directly:
    > int tmpVal = getValue();
    >
    > Not quite sure why you are using "this"...


    I'm using it because "int tmpVal = getValue();" got me an error: "29
    Hand.cpp `getValue' undeclared (first use this function)" despite the
    fact that it is declared public in my header file.

    I also tried the -> pointer as well and that got me the error: "29
    W:\Projects\C++\Game\BlackJack\src\Hand.cpp invalid use of `this' in
    non-member function," and, yet, the function calling it is also declared
    in the header section.

    Do I need to declare it something else? Like "virtual?" I'm still
    confused on this one.

    Ed.
    Ed Dana, Jan 29, 2007
    #4
  5. Ed Dana

    Rolf Magnus Guest

    Ed Dana wrote:

    > Ambar Shukla wrote:
    >>
    >> On Jan 29, 6:23 am, Ed Dana <> wrote:
    >>
    >>>Maybe my brain's just tired, or maybe the book I'm reading from is just
    >>>crap, but... how do I do this Java reference in C++?
    >>>
    >>>int tmpVal = this.getValue( );
    >>>
    >>>Thanks in advance.
    >>>
    >>>Ed.

    >>
    >>
    >> "this" is a pointer, so you need to use the "->" operator instead of
    >> "."
    >> Try int tmpVal = this->getValue( );
    >>
    >> Else directly:
    >> int tmpVal = getValue();
    >>
    >> Not quite sure why you are using "this"...

    >
    > I'm using it because "int tmpVal = getValue();" got me an error: "29
    > Hand.cpp `getValue' undeclared (first use this function)" despite the
    > fact that it is declared public in my header file.


    Post a minimal, but complete program that shows the problem.

    > I also tried the -> pointer as well and that got me the error: "29
    > W:\Projects\C++\Game\BlackJack\src\Hand.cpp invalid use of `this' in
    > non-member function," and, yet, the function calling it is also declared
    > in the header section.


    Well, that message means that you are defining a non-member function. Again,
    you should post some actual code.

    > Do I need to declare it something else?


    Dpends on how you do it currently.

    > Like "virtual?"


    virtual is only needed for polymorphism.
    Rolf Magnus, Jan 29, 2007
    #5
  6. Ed Dana

    Default User Guest

    Ed Dana wrote:

    > Ambar Shukla wrote:
    > >
    > >On Jan 29, 6:23 am, Ed Dana <> wrote:
    > >
    > > > Maybe my brain's just tired, or maybe the book I'm reading from
    > > > is just crap, but... how do I do this Java reference in C++?
    > > >
    > > > int tmpVal = this.getValue( );
    > > >
    > > > Thanks in advance.
    > > >
    > > > Ed.

    > >
    > >
    > > "this" is a pointer, so you need to use the "->" operator instead
    > > of "." Try int tmpVal = this->getValue( );
    > >
    > > Else directly:
    > > int tmpVal = getValue();
    > >
    > > Not quite sure why you are using "this"...

    >
    > I'm using it because "int tmpVal = getValue();" got me an error: "29
    > Hand.cpp `getValue' undeclared (first use this function)" despite the
    > fact that it is declared public in my header file.
    >
    > I also tried the -> pointer as well and that got me the error: "29
    > W:\Projects\C++\Game\BlackJack\src\Hand.cpp invalid use of `this' in
    > non-member function," and, yet, the function calling it is also
    > declared in the header section.
    >
    > Do I need to declare it something else? Like "virtual?" I'm still
    > confused on this one.


    These sorts of guessing games are irritating and pointless. Post a
    complete, minimal program that demonstrates the problem.

    See the newsgroup FAQ for more posting tips.





    Brian
    Default User, Jan 29, 2007
    #6
  7. Ed Dana

    Ed Dana Guest

    Rolf Magnus wrote:
    > Ed Dana wrote:
    >
    >>Do I need to declare it something else?

    >
    >
    > Dpends on how you do it currently.
    >


    All right, the header file looks like this:
    ======================================================================
    #define _Hand_H_

    #include "Card.h"

    class Hand {
    public:
    Hand();

    bool add(Card prmCard);
    bool canDouble();
    bool canSplit();
    int getSize();
    int getValue();
    bool isBlackjack();
    bool isBusted();
    bool isSoft();
    void setHidden(int prmHideNo);

    private:
    bool clsSoft;
    int clsCount;
    int clsHidden;
    Card clsCard[10];
    };
    ======================================================================

    The body looks like this:
    ======================================================================
    #include <cstdlib>
    #include <iostream>
    #include <string>
    using namespace std;

    // Declarations...
    #ifndef _Hand_H_
    #include "Hand.h"
    #endif

    // Definitions...
    bool clsSoft = false;
    int clsCount = 0;
    int clsHidden = 0;
    Card clsCard[10];

    // Constructors...
    Hand::Hand( ) {

    }

    // Methods...
    bool add(Card prmCard) {
    clsCard[clsCount++] = prmCard;
    };

    bool canDouble() {
    bool tmpBool = false;
    int tmpVal = this->getValue( ); <-- This line fails
    if ( clsCount == 2
    && (tmpVal == 10 || tmpVal == 11)
    )
    tmpBool = true;
    return tmpBool;
    };

    bool canSplit() {
    ;
    };

    int getSize() {
    return clsCount;
    };

    int getValue() {
    int sumInt = 0;
    bool thereBeAcesHere = false;
    for ( int h = 0; h < clsCount; h++) {
    int tmpInt = clsCard[h].getFaceValue();
    sumInt += tmpInt;
    if (tmpInt==1) thereBeAcesHere = true;
    }
    clsSoft = false;
    if (thereBeAcesHere && sumInt < 12) {
    sumInt += 10;
    clsSoft = true;
    }
    return sumInt;
    };

    bool isBlackjack() {
    ;
    };

    bool isBusted() {
    ;
    };

    bool isSoft() {
    ;
    };

    void setHidden(int prmHideNo) {
    clsHidden = prmHideNo;
    };
    ======================================================================

    The error I get is "invalid use of `this' in non-member function,"
    which, as far as I know, is a member function. But I'm sure that I'm
    missing something obvious here.

    >>Like "virtual?"

    >
    > virtual is only needed for polymorphism.
    >


    That's what I thought too. :) But then, that's why I'm asking questions,
    cause I'm not sure what the issue is.

    Ed.
    Ed Dana, Jan 29, 2007
    #7
  8. Ed Dana

    Ed Dana Guest

    Default User wrote:
    > These sorts of guessing games are irritating and pointless. Post a
    > complete, minimal program that demonstrates the problem.
    >
    > See the newsgroup FAQ for more posting tips.


    Dude. Take a chill pill. I know the posting rules.

    My last post I was criticized for not posting enough code. If I posted
    the entire source, I'd be criticized for posting too much code. So, the
    question becomes "how much code is enough?" For this question, I was
    merely trying to find out what the proper method was, and that's using
    the "->" pointer. Now, I know the answer and it's obvious the problem is
    bigger than which pointer to use, so I'll post more info, but you still
    need to chill.

    Why is it programmers are some of the most up-tight people on Earth,
    I'll never know.

    Ed.
    Ed Dana, Jan 29, 2007
    #8
  9. Ed Dana

    Rolf Magnus Guest

    Ed Dana wrote:

    > Rolf Magnus wrote:
    >> Ed Dana wrote:
    >>
    >>>Do I need to declare it something else?

    >>
    >>
    >> Dpends on how you do it currently.
    >>

    >
    > All right, the header file looks like this:
    > ======================================================================
    > #define _Hand_H_


    You shouldn't use this identifier. It's reserved.

    [...]

    > #include <cstdlib>
    > #include <iostream>
    > #include <string>
    > using namespace std;
    >
    > // Declarations...
    > #ifndef _Hand_H_
    > #include "Hand.h"
    > #endif


    Put the #ifndef into the header. Otherwise it will be pretty much useless.

    > // Definitions...
    > bool clsSoft = false;
    > int clsCount = 0;
    > int clsHidden = 0;
    > Card clsCard[10];
    >
    > // Constructors...
    > Hand::Hand( ) {
    >
    > }
    >
    > // Methods...
    > bool add(Card prmCard) {
    > clsCard[clsCount++] = prmCard;
    > };


    This is a non-member function. It has nothing to do with the add() member
    function of your class. Just like you did with the constructor, you have to
    qalify the name, i.e. write:

    bool Hand::add(Card prmCard)

    Since you have out-of-class duplicates of all the member variables, you
    don't get an error from the access. However, as it's now, the function does
    not access the member variable clsCard of class Hand, but the global
    variable.

    > bool canDouble() {
    > bool tmpBool = false;
    > int tmpVal = this->getValue( ); <-- This line fails


    Well, since the function is not defined as member variable, there is
    no 'this' pointer.

    [...]

    > The error I get is "invalid use of `this' in non-member function,"
    > which, as far as I know, is a member function. But I'm sure that I'm
    > missing something obvious here.


    To be honest, this all looks as if you are trying to get your program
    working by guessing how C++ works, which won't work too well (I have been
    down that road myself). Get a good C++ book and read it.
    Rolf Magnus, Jan 29, 2007
    #9
  10. Ed Dana wrote:
    > Rolf Magnus wrote:
    >> Ed Dana wrote:
    >>
    >>> Do I need to declare it something else?

    >>
    >>
    >> Dpends on how you do it currently.
    >>

    >
    > All right, the header file looks like this:


    Just a few comments so that next time your code looks better...

    > ======================================================================
    > #define _Hand_H_


    Identifiers that begin with an underscore and a capital letter are
    reserved by the implemenation. You cannot use them.

    >
    > #include "Card.h"
    >
    > class Hand {
    > public:
    > Hand();
    >
    > bool add(Card prmCard);
    > bool canDouble();
    > bool canSplit();
    > int getSize();
    > int getValue();
    > bool isBlackjack();
    > bool isBusted();
    > bool isSoft();
    > void setHidden(int prmHideNo);
    >
    > private:
    > bool clsSoft;
    > int clsCount;
    > int clsHidden;
    > Card clsCard[10];
    > };
    > ======================================================================
    >
    > The body looks like this:
    > ======================================================================
    > #include <cstdlib>
    > #include <iostream>
    > #include <string>
    > using namespace std;
    >
    > // Declarations...
    > #ifndef _Hand_H_


    You have the include guard in the header file, you don't need one
    here (regardless of what some book authors say). It doesn't hurt
    anything except readablity of your code.

    > #include "Hand.h"
    > #endif
    >
    > // Definitions...
    > bool clsSoft = false;
    > int clsCount = 0;
    > int clsHidden = 0;
    > Card clsCard[10];


    What are those supposed to be? Why do you think you need those
    objects at the namespace scope? They look strikingly similar to
    the member data in 'Hand' class.

    >
    > // Constructors...
    > Hand::Hand( ) {


    Did you mean to initialise your member data here somehow?

    >
    > }
    >
    > // Methods...
    > bool add(Card prmCard) {


    Are you trying to define a member function here? You should
    consider naming it correctly:

    bool Hand::add(Card prmCard) {

    Otherwise, you're defining a non-member function.

    > clsCard[clsCount++] = prmCard;


    This function declares a return value type, but no 'return'
    statement seems to be in sight. Did you mean to make it 'void'?
    If this function is ever called and its return value used, you
    have undefined behaviour (UB).

    > };


    The trailing semicolon after a function body in the file scope
    is a syntax error. Please remove all of them.

    >
    > bool canDouble() {


    Same here. You probably wanted to write

    bool Hand::canDouble() {

    > bool tmpBool = false;
    > int tmpVal = this->getValue( ); <-- This line fails
    > if ( clsCount == 2
    > && (tmpVal == 10 || tmpVal == 11)
    > )
    > tmpBool = true;
    > return tmpBool;
    > };
    >
    > bool canSplit() {
    > ;


    Again, a function returning 'bool' without any 'return'
    statement. A disaster waiting to happen.

    > };
    >
    > int getSize() {
    > return clsCount;
    > };
    >
    > int getValue() {
    > int sumInt = 0;
    > bool thereBeAcesHere = false;
    > for ( int h = 0; h < clsCount; h++) {
    > int tmpInt = clsCard[h].getFaceValue();
    > sumInt += tmpInt;
    > if (tmpInt==1) thereBeAcesHere = true;
    > }
    > clsSoft = false;
    > if (thereBeAcesHere && sumInt < 12) {
    > sumInt += 10;
    > clsSoft = true;
    > }
    > return sumInt;
    > };
    >
    > bool isBlackjack() {
    > ;
    > };
    >
    > bool isBusted() {
    > ;
    > };
    >
    > bool isSoft() {
    > ;
    > };
    >
    > void setHidden(int prmHideNo) {
    > clsHidden = prmHideNo;
    > };
    > ======================================================================
    >
    > The error I get is "invalid use of `this' in non-member function,"
    > which, as far as I know, is a member function. But I'm sure that I'm
    > missing something obvious here.


    You are. See above.

    >[..]


    V
    --
    Please remove capital 'A's when replying by e-mail
    I do not respond to top-posted replies, please don't ask
    Victor Bazarov, Jan 29, 2007
    #10
  11. Ed Dana

    Ed Dana Guest

    Rolf Magnus wrote:
    >
    > This is a non-member function. It has nothing to do with the add() member
    > function of your class. Just like you did with the constructor, you have to
    > qalify the name, i.e. write:
    >
    > bool Hand::add(Card prmCard)
    >


    Ahhh... I forgot about this little fact. My other classes do this but it
    didn't even register in my mind when I looked at them. I knew it was
    another newbie mistake. :) I was assuming it was defined in the header
    file and I was missing something there.

    > Since you have out-of-class duplicates of all the member variables, you
    > don't get an error from the access. However, as it's now, the function does
    > not access the member variable clsCard of class Hand, but the global
    > variable.
    >
    >
    >>bool canDouble() {
    >> bool tmpBool = false;
    >> int tmpVal = this->getValue( ); <-- This line fails

    >
    >
    > Well, since the function is not defined as member variable, there is
    > no 'this' pointer.
    >


    Fair enough. I'm used to higher level languages, and I mean higher level
    than even Java, which I find somewhat crude. Since C++ is lower level, I
    tend to forget about some of its idioms.

    > To be honest, this all looks as if you are trying to get your program
    > working by guessing how C++ works, which won't work too well (I have been
    > down that road myself). Get a good C++ book and read it.
    >


    I do have a book. I have been reading it. But I'm beginning to suspect
    it's a lousy book. That, and the fact that I'm not doing this full time.
    A little bit here, a little bit there. That's how I can forget about
    something like qualifying the member function with the class name in
    order to make it a member class.

    Thanks for the assist. I appreciate it.

    Ed.
    Ed Dana, Jan 29, 2007
    #11
  12. Ed Dana

    Ian Collins Guest

    Ed Dana wrote:
    > Default User wrote:
    >
    >> These sorts of guessing games are irritating and pointless. Post a
    >> complete, minimal program that demonstrates the problem.
    >>
    >> See the newsgroup FAQ for more posting tips.

    >
    >
    > Dude. Take a chill pill. I know the posting rules.
    >

    The follow them, for your benefit.

    > My last post I was criticized for not posting enough code. If I posted
    > the entire source, I'd be criticized for posting too much code.
    >

    There are two good reasons for posting a complete, minimal program that
    demonstrates the problem:

    1 - The process of distilling your problem down to a small example often
    flushes the bug for you.

    2 - It enables someone interesting helping to compile to code and find
    the problem.

    --
    Ian Collins.
    Ian Collins, Jan 29, 2007
    #12
  13. Ed Dana

    JLS Guest

    On Jan 29, 4:35 pm, "Victor Bazarov" <> wrote:
    > Ed Dana wrote:
    > > Rolf Magnus wrote:
    > >> Ed Dana wrote:

    >
    > >>> Do I need to declare it something else?

    >
    > >> Dpends on how you do it currently.

    >
    > > All right, the header file looks like this:Just a few comments so that next time your code looks better...

    >
    > > ======================================================================
    > > #define _Hand_H_Identifiers that begin with an underscore and a capital letter are

    > reserved by the implemenation. You cannot use them.
    >
    >
    >
    >
    >
    >
    >
    > > #include "Card.h"

    >
    > > class Hand {
    > > public:
    > > Hand();

    >
    > > bool add(Card prmCard);
    > > bool canDouble();
    > > bool canSplit();
    > > int getSize();
    > > int getValue();
    > > bool isBlackjack();
    > > bool isBusted();
    > > bool isSoft();
    > > void setHidden(int prmHideNo);

    >
    > > private:
    > > bool clsSoft;
    > > int clsCount;
    > > int clsHidden;
    > > Card clsCard[10];
    > > };
    > > ======================================================================

    >
    > > The body looks like this:
    > > ======================================================================
    > > #include <cstdlib>
    > > #include <iostream>
    > > #include <string>
    > > using namespace std;

    >
    > > // Declarations...
    > > #ifndef _Hand_H_You have the include guard in the header file, you don't need one

    > here (regardless of what some book authors say). It doesn't hurt
    > anything except readablity of your code.
    >
    > > #include "Hand.h"
    > > #endif

    >
    > > // Definitions...
    > > bool clsSoft = false;
    > > int clsCount = 0;
    > > int clsHidden = 0;
    > > Card clsCard[10];What are those supposed to be? Why do you think you need those

    > objects at the namespace scope? They look strikingly similar to
    > the member data in 'Hand' class.
    >
    >
    >
    > > // Constructors...
    > > Hand::Hand( ) {Did you mean to initialise your member data here somehow?

    >
    >
    >
    > > }

    >
    > > // Methods...
    > > bool add(Card prmCard) {Are you trying to define a member function here? You should

    > consider naming it correctly:
    >
    > bool Hand::add(Card prmCard) {
    >
    > Otherwise, you're defining a non-member function.
    >
    > > clsCard[clsCount++] = prmCard;This function declares a return value type, but no 'return'

    > statement seems to be in sight. Did you mean to make it 'void'?
    > If this function is ever called and its return value used, you
    > have undefined behaviour (UB).
    >
    > > };The trailing semicolon after a function body in the file scope

    > is a syntax error. Please remove all of them.
    >
    >
    >
    > > bool canDouble() {Same here. You probably wanted to write

    >
    > bool Hand::canDouble() {
    >
    > > bool tmpBool = false;
    > > int tmpVal = this->getValue( ); <-- This line fails
    > > if ( clsCount == 2
    > > && (tmpVal == 10 || tmpVal == 11)
    > > )
    > > tmpBool = true;
    > > return tmpBool;
    > > };

    >
    > > bool canSplit() {
    > > ;Again, a function returning 'bool' without any 'return'

    > statement. A disaster waiting to happen.
    >
    >
    >
    >
    >
    > > };

    >
    > > int getSize() {
    > > return clsCount;
    > > };

    >
    > > int getValue() {
    > > int sumInt = 0;
    > > bool thereBeAcesHere = false;
    > > for ( int h = 0; h < clsCount; h++) {
    > > int tmpInt = clsCard[h].getFaceValue();
    > > sumInt += tmpInt;
    > > if (tmpInt==1) thereBeAcesHere = true;
    > > }
    > > clsSoft = false;
    > > if (thereBeAcesHere && sumInt < 12) {
    > > sumInt += 10;
    > > clsSoft = true;
    > > }
    > > return sumInt;
    > > };

    >
    > > bool isBlackjack() {
    > > ;
    > > };

    >
    > > bool isBusted() {
    > > ;
    > > };

    >
    > > bool isSoft() {
    > > ;
    > > };

    >
    > > void setHidden(int prmHideNo) {
    > > clsHidden = prmHideNo;
    > > };
    > > ======================================================================

    >
    > > The error I get is "invalid use of `this' in non-member function,"
    > > which, as far as I know, is a member function. But I'm sure that I'm
    > > missing something obvious here.You are. See above.

    >
    > >[..]V

    > --
    > Please remove capital 'A's when replying by e-mail
    > I do not respond to top-posted replies, please don't ask- Hide quoted text -- Show quoted text -- Hide quoted text -- Show quoted text -


    Of course, it would also be nice to see the keyword "const" used,
    especially on the accessor methods.
    JLS, Jan 29, 2007
    #13
  14. Ed Dana

    Ed Dana Guest

    Ian Collins wrote:

    > There are two good reasons for posting a complete, minimal program that
    > demonstrates the problem:
    >
    > 1 - The process of distilling your problem down to a small example often
    > flushes the bug for you.
    >
    > 2 - It enables someone interesting helping to compile to code and find
    > the problem.
    >


    I understand that. And in previous posts have even done so. But this
    post started as a simple question and evolved from there.

    Ed.
    Ed Dana, Jan 29, 2007
    #14
  15. Ed Dana

    Default User Guest

    Ed Dana wrote:

    > Default User wrote:
    > > These sorts of guessing games are irritating and pointless. Post a
    > > complete, minimal program that demonstrates the problem.
    > >
    > > See the newsgroup FAQ for more posting tips.

    >
    > Dude. Take a chill pill. I know the posting rules.
    >
    > My last post I was criticized for not posting enough code.


    Correctly so.

    > If I
    > posted the entire source, I'd be criticized for posting too much
    > code.


    Did I tell you to do that? Reread.

    > So, the question becomes "how much code is enough?"


    A COMPLETE MINIMAL PROGRAM THAT DEMONSTRATES THE PROBLEM. Think you can
    get it now?

    > Why is it programmers are some of the most up-tight people on Earth,
    > I'll never know.


    Idiot.




    Brian
    Default User, Jan 29, 2007
    #15
  16. Ed Dana

    Ed Dana Guest

    Default User wrote:

    >>Why is it programmers are some of the most up-tight people on Earth,
    >>I'll never know.

    >
    >
    > Idiot.
    >


    You're very gracious.

    Ed.
    Ed Dana, Jan 29, 2007
    #16
  17. Ed Dana

    Default User Guest

    Ed Dana wrote:

    > Default User wrote:
    >
    > > > Why is it programmers are some of the most up-tight people on
    > > > Earth, I'll never know.

    > >
    > >
    > > Idiot.
    > >

    >
    > You're very gracious.


    And you are rude and uncooperative when you come here asking for free
    advice. You ought to be ashamed of your behavior, and you owe an
    apology all these kind people who helped you in spite of your lack of
    deceny.




    Brian
    Default User, Jan 29, 2007
    #17
  18. Ed Dana

    Ed Dana Guest

    Default User wrote:
    > Ed Dana wrote:
    >>>>Why is it programmers are some of the most up-tight people on
    >>>>Earth, I'll never know.
    >>>
    >>>Idiot.

    >>
    >>You're very gracious.

    >
    > And you are rude and uncooperative when you come here asking for free
    > advice. You ought to be ashamed of your behavior, and you owe an
    > apology all these kind people who helped you in spite of your lack of
    > deceny.


    Yes, yes, yes... I should have known that my question could only have
    been answered by posting source code first when it was a simple question
    about what method I should have been using.

    I would have posted the code eventually, and was preparing to do so when
    it became obvious that the problem was broader than my simple question.
    Do forgive me for exercising my discretion.

    [rolls eyes]

    Ed.
    Ed Dana, Jan 29, 2007
    #18
  19. Ed Dana

    Default User Guest

    Ed Dana wrote:

    > Default User wrote:
    > > Ed Dana wrote:
    > > > > > Why is it programmers are some of the most up-tight people on
    > > > > > Earth, I'll never know.
    > > > >
    > > > > Idiot.
    > > >
    > > > You're very gracious.

    > >
    > > And you are rude and uncooperative when you come here asking for
    > > free advice. You ought to be ashamed of your behavior, and you owe
    > > an apology all these kind people who helped you in spite of your
    > > lack of deceny.

    >
    > Yes, yes, yes... I should have known that my question could only have
    > been answered by posting source code first when it was a simple
    > question about what method I should have been using.
    >
    > I would have posted the code eventually, and was preparing to do so
    > when it became obvious that the problem was broader than my simple
    > question. Do forgive me for exercising my discretion.


    The apology I was suggesting wasn't for not posting the code, although
    that would have been nice. It was for needlessly insulting the people
    who helped you.

    Had you wanted to insult me personally, you should have done so,
    without doing so to everyone else including those that have done quite
    a bit of work on your behalf.

    As I said, you should be ashamed. You don't seem to be.




    Brian
    Default User, Jan 29, 2007
    #19
  20. Ed Dana

    Old Wolf Guest

    On Jan 30, 10:14 am, Ed Dana <> wrote:
    > My last post I was criticized for not posting enough code. If I posted
    > the entire source, I'd be criticized for posting too much code. So, the
    > question becomes "how much code is enough?" For this question, I was
    > merely trying to find out what the proper method was, and that's using
    > the "->" pointer. Now, I know the answer and it's obvious the problem is
    > bigger than which pointer to use, so I'll post more info, but you still
    > need to chill.
    >
    > Why is it programmers are some of the most up-tight people on Earth,
    > I'll never know.


    Don't worry, plenty of us aren't. In fact I wouldn't mind if there
    were a compiler warning for forgetting to include Class:: on the
    definition of member functions; I do it all the time and then
    puzzle over why the wrong function overload is being called, etc.
    Old Wolf, Jan 29, 2007
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Byte
    Replies:
    10
    Views:
    434
  2. Brandon McCombs
    Replies:
    4
    Views:
    498
    Richard Wheeldon
    Aug 28, 2006
  3. Darren
    Replies:
    1
    Views:
    406
    Martin Honnen
    Mar 13, 2007
  4. rincewind

    stupid, STUPID question!

    rincewind, Apr 19, 2009, in forum: HTML
    Replies:
    25
    Views:
    1,006
  5. maryellen sniffen

    another newbie stupid question

    maryellen sniffen, Dec 31, 2004, in forum: Perl Misc
    Replies:
    7
    Views:
    99
    Scott Bryce
    Dec 31, 2004
Loading...

Share This Page