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

Search:

Type: Posts; User: Bassman

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Sam, What definition of sort makes this...

    Sam,



    What definition of sort makes this correct (and the poster you replied to incorrect) and what is your justification for the definition? Specifically, why does your definition vary from...
  2. You probably should....

    You probably should.
    (Binary tree sort)

    Regards,
    Bassman
  3. Also, Sam, I should point out that my main issue...

    Also, Sam, I should point out that my main issue here is simply that:

    Building a binary/AVL tree == Sorting an unsorted array == O(n log n)

    So the act of arranging the items in a logical order...
  4. If you consider it so insignificant, why are you...

    If you consider it so insignificant, why are you taking the trouble to post it to a new thread?

    What in particular is the specific problem with saying that inserting a group of items into a binary...
  5. And my point was that a 'separate sort' and...

    And my point was that a 'separate sort' and 'building a sorted list' are algorithmically and functionally equivalent. Both perform a sort operation.

    So it's correct to say that data can not be...
  6. To sort - to arrange; to put into a specific...

    To sort - to arrange; to put into a specific order or relation.

    You disagree on this definition? Why impede communication with your peers by making up your own definition of words? That's awfully...
  7. I disagree. Data must be explicitly sorted to be...

    I disagree. Data must be explicitly sorted to be displayed in a conceptual 'order'.

    Inserting a group of items into a binary tree explicitly sorts the items.

    The sort is just distributed over n...
  8. Replies
    17
    Views
    933

    Oh, of course nobody wants this to turn into a...

    Oh, of course nobody wants this to turn into a 'witch-hunt,' as you so eloquently put it. There's nothing to hunt - it's completely obvious you were being a doofus.

    Sarcasm
    {
    Thank you so much...
  9. Thread: constrctor

    by Bassman
    Replies
    12
    Views
    1,953

    Like anything else, the use of exceptions is...

    Like anything else, the use of exceptions is fraught with debate and it's closer to a religious argument than it is to an objective cost-benefit analysis.

    In this article specifically, the...
  10. Thread: constrctor

    by Bassman
    Replies
    12
    Views
    1,953

    My two cents: I used to do this, but now I...

    My two cents: I used to do this, but now I generally don't like to do this, because it breaks the RAII idiom that I've grown so fond of. Not only that, but it's almost always unneccesary.
    ...
  11. Replies
    5
    Views
    493

    No, as long as you call pA1 = pA2->m_pA1;...

    No, as long as you call



    pA1 = pA2->m_pA1;


    before
  12. Replies
    5
    Views
    493

    Not neccessarily true. Dereferencing pa2 will...

    Not neccessarily true.

    Dereferencing pa2 will naturally fail, but:



    classA1* pA1 = pA2->m_pA1;
    delete pA2;
    pA1->DoSomething();
  13. Replies
    8
    Views
    623

    Hmmm.... when I wrote that, I disremembered...

    Hmmm.... when I wrote that, I disremembered myself into thinking that the structure only pads the end of the structure to stay aligned, but of course you're right - there's no guarantees.

    And like...
  14. Replies
    8
    Views
    623

    No, you could do a really ugly trick. char...

    No, you could do a really ugly trick.


    char *pString = "12345612345678123412";
    myStruct* pStruct = reinterpret_cast<myStruct*>(pString);


    Then use pStruct->sFirstParam, etc.

    However,...
  15. Replies
    3
    Views
    454

    Inside Philip's loop T item = *it;

    Inside Philip's loop


    T item = *it;
  16. Replies
    3
    Views
    2,543

    Just to beat the dead horse, (111111111 %...

    Just to beat the dead horse,

    (111111111 % 65536) = 27591

    so your code is correct to the precision of an unsigned 16-bit integer. Like Phillip said, if you want more than 65535, you should use...
  17. Thread: Engines

    by Bassman
    Replies
    5
    Views
    516

    Before you start researching implementation...

    Before you start researching implementation techniques, you need to know exactly what it is going to do, and exactly how you want people to use it. Otherwise, you're just yelling in the wind.

    Is...
  18. Replies
    5
    Views
    1,052

    I know for certain that many compilers will...

    I know for certain that many compilers will optimize tail recursion into an iterative solution.

    (Briefly) Tail recursion means that there are no operations after the recursive call - and that kind...
  19. Your question is strange... As has been pointed...

    Your question is strange... As has been pointed out, a linked list by definition uses pointers - so what is it exactly that you're trying to accomplish and why?

    Regards,
    Bassman
  20. Just to add to the discussion, grp = new...

    Just to add to the discussion,


    grp = new char [sizeof (penv) + 1];

    makes me think you really want to do:


    grp = new char [strlen(penv) + 1];
  21. Thread: n factorial

    by Bassman
    Replies
    40
    Views
    3,455

    Yeah, sorry, my fault - I shouldn't be such a...

    Yeah, sorry, my fault - I shouldn't be such a boob. Like I said, I'm grumpy today. Stupid COM objects...

    :)

    Peace,
    Bassman
  22. Thread: n factorial

    by Bassman
    Replies
    40
    Views
    3,455

    Doctor Luz said: ... and later ... ...

    Doctor Luz said:



    ... and later ...



    (flip/flop)
  23. Thread: n factorial

    by Bassman
    Replies
    40
    Views
    3,455

    (Taking the piss) What's there to argue about? ...

    (Taking the piss) What's there to argue about?

    n! is defined as Gamma(n + 1) for all complex numbers > 0. For positive integers, n! is also defined as n * n-1 * n-2 * ... * 3 * 2.

    And BTW, you...
  24. Thread: n factorial

    by Bassman
    Replies
    40
    Views
    3,455

    I thought he was full of s*, too (no offense,...

    I thought he was full of s*, too (no offense, man), so I googled and found,

    http://mathworld.wolfram.com/Factorial.html

    Check out (7).

    AAAIAIAIAGH!!! INTEGRALS SCARY!!!! AIGH!!

    Peace,...
  25. Replies
    6
    Views
    618

    No, I meant just the printing code - like this: ...

    No, I meant just the printing code - like this:



    void triangle(ostream& outs, int m, int n){
    int i;

    for(i=0;i<m;i++)
    outs << "*";
    cout << endl;
Results 1 to 25 of 59
Page 1 of 3 1 2 3


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