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.10 seconds.

  1. Replies
    8
    Views
    272

    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...
  2. Replies
    8
    Views
    272

    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...
  3. Replies
    10
    Views
    271

    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...
  4. Replies
    10
    Views
    271

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

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

    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...
  6. Replies
    6
    Views
    266

    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.
  7. Replies
    4
    Views
    213

    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!),...
  8. Re: Help with c++ date validation program

    BTW, month names in English are capitalized.
  9. 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...
  10. 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...
  11. 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...
  12. 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?
  13. Re: Sequentially remove one element from a vector at a time with replacement

    I think he wants to process sequence of partial permutations?
  14. 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...
  15. 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...
  16. 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....
  17. 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),...
  18. 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...
  19. Re: heap short and heap tree about help me pls c++

    wut
  20. Re: Why are my random values not very random?

    I call BS on that statement. All random number generators generate randomness with varying "quality", but *none* will emulate something such as "skewedness" or "loadedness". They will all generate...
  21. Re: Why are my random values not very random?

    srand "(re)initialises" your global rand sequence using the seed you give it. If you are using clock, then chances are the clock did not actually change, so you are effectively "resetting" your rand...
  22. Re: Why are my random values not very random?

    I didn't read the code.

    If you are getting the same result every *run*, then your forgot to srand.
    If you are experiencing duplicate sequences in a single run, then you are probably...
  23. Replies
    4
    Views
    358

    Re: wild output from a const char array

    Stating you "have" to use an if than proceeding to basically put a switch inside your for loop to special case the iteration is an anti-pattern.

    All I can understand is that you want to read your...
  24. Replies
    4
    Views
    358

    Re: wild output from a const char array

    Your "buff" is an array of characters, therefore your "cstr" is just *a* string. "cstr[0]" is the first character, and "cstr[1]" is the second character.

    It would appear that you think that "cstr"...
  25. Replies
    7
    Views
    611

    Re: class taking integers or doubles

    !!!! That's some seriously old style C.

    Back to the subject at hand, you seem to want to have either an integral fraction (5/4) or a floating point fraction (2.3/5.2) depending on what the user...
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