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

Search:

Type: Posts; User: monarch_dodra

Page 1 of 80 1 2 3 4

Search: Search took 0.12 seconds.

  1. Re: overriding base class template method

    Be careful. This is probably not what you wanted. I believe what you wanted here was to do a "specialization"? This is not what you did. What you did was declare a template parameterized on *a*...
  2. Replies
    18
    Views
    663

    Re: [RESOLVED] map iterators

    Actually, that's a good point. I forgot about that. That means that my_map.end() is always valid *for a given map*, regardless of what you do to that map.

    I would also guess that that kind of also...
  3. Replies
    18
    Views
    663

    Re: [RESOLVED] map iterators

    Sounds like a good plan actually :)
  4. Replies
    18
    Views
    663

    Re: [RESOLVED] map iterators

    Hum... I'd have suggested "optns.end()" instead... ?

    Although if you do modify optns, then later, your piter might not compare with .end()

    I'd have suggested simply "OPTITER()", but depending...
  5. Replies
    51
    Views
    1,791

    Re: .h and .cpp

    I'm pretty sure there is also a big implication on compilation times...
  6. Re: suggestions for changing some bit of a number

    Generate 3 random numbers between 0 and 191, and flip those bits?

    Just make sure you don't generate the same number twice: Either re-roll when it happens, or try a random shuffle.
  7. Re: Creating a good computer AI for a tic tac toe game.

    To add to that, I'd add an abstract class called "Player", which would have different implementations, such as "HumanPlayer" "DumbAI" "SmartAI" etc...

    A Game would be made of 2 Players and a...
  8. Replies
    8
    Views
    501

    Re: Adding element into an n-ary Tree

    My first comment is: "I know it's easier using std::list but we were asked to implement the projet using our own home-made List class, so we learn how to do it." I don't see a home made list class...
  9. Replies
    8
    Views
    501

    Re: Adding element into an n-ary Tree

    Should your nodes hold the number information in some place? Or is the idea that the node's index in its container makes that implicit?

    In any case, to insert a word, I'd decompose it into its...
  10. Replies
    10
    Views
    509

    Re: Hepl me with search name code in C++

    Ideally, I think you should store your names in an (unordered_)set. A set is a data structure that manages its own ordering, and is itself capable of retrieving items for you, and knowing if they are...
  11. Replies
    10
    Views
    509

    Re: Hepl me with search name code in C++

    You need to read what you just wrote. Which variable are you using to iterate?
  12. Replies
    10
    Views
    509

    Re: Hepl me with search name code in C++

    Please properly format your code. I don't see any "search name" function. What exactly isn't working for you?



    This declares a variable length array and is not standard C++. Use an std::vector...
  13. Replies
    6
    Views
    468

    Re: c++ memory allocation question?

    I remember this question with the actual "design requirements" which would have better helped answer. As is, we can only guess from the names what the functions should do. My guess is:



    Yes.
  14. Replies
    4
    Views
    358

    Re: find object in vector and delete

    There is a version of find called "find_if" that can take a predicate, and will return an iterator to the first element for which pred(e) returns true.

    If you do a functor approach (with state!),...
  15. Re: Help with c++ date validation program

    BTW, month names in English are capitalized.
  16. Re: Help with c++ date validation program

    First thing: If you want some real help, please take the time to format your code into something easy to read. We are giving you free help. If you can't make the effort, then you we might not feel...
  17. Re: sort vector of objects on member variable

    No.

    It means that *IF* your object is declared in a name space *THEN* your "operator<" *SHOULD* be in the same namespace. This is for Koenig lookup, but you shouldn't have to worry (or even know...
  18. Re: sort vector of objects on member variable

    As laserlight said, you can either define operator< in result_holder for a "default" sort. If you want to customize the sort, you can do it either via a function pointer or functor.

    if you want to...
  19. Re: Sequentially remove one element from a vector at a time with replacement

    I'm a bit rusty on my linear algebra, but it seems you are basically just trying to find the basis of your matrix? Aren't there known algorithms that do that already?
  20. Re: Sequentially remove one element from a vector at a time with replacement

    I think he wants to process sequence of partial permutations?
  21. Re: Sequentially remove one element from a vector at a time with replacement

    Well, depending on how you look at it, he's only *swapping* items in and out, but never actually doing insertions or deletions. Given OP (seems) to be working with trivial ints, then sticking with...
  22. Re: Determination if sequance is increasing or non- decreasing

    Yes, I hesitated to mention this. But to be frank, I think that's a bit over OP's level...
  23. Re: Determination if sequance is increasing or non- decreasing

    For what it's worth, if this is a class assignment (and it looks like it is) that requires a recursive solution, then a simple "check first, recurse the rest" might not be what is being asked of you....
  24. Re: Byte Array to double Conversion

    It's just shorthand: a reference is (mostly) just a "dereferenced pointer" managed by the compiler. You are reinterpreting the reference, which is equivqlent to extracting a reference (pointer),...
  25. Re: Byte Array to double Conversion

    You are "C casting" your long long back to a double "(double)piAsLong". This is a standard value-style static_cast: You are literally reading the numeric value of your long (f1d4c853fb210940), and...
Results 1 to 25 of 2000
Page 1 of 80 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center