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

Search:

Type: Posts; User: TheDominis

Page 1 of 2 1 2

Search: Search took 0.04 seconds.

  1. Replies
    6
    Views
    1,494

    Re: Layered Window -- Strange behavior

    Can't draw with colors that have alpha.

    Functions such as MoveToEx and LineTo.
  2. Replies
    6
    Views
    1,494

    Re: Layered Window -- Strange behavior

    It may be recommended to paint in response to WM_PAINT messages and the like, but I've found that advising a person to always follows a certain paradigm is ostentatious.

    The problem is that the...
  3. Replies
    6
    Views
    1,494

    Layered Window -- Strange behavior

    I'm trying to get a layered window to drag with the mouse, but it isn't even possible to click the window without it exhibiting behavior as if it were created with WS_EX_TRANSPARENT.



    #include...
  4. Replies
    1
    Views
    630

    Re: Passing Parameters

    Solved.
  5. Replies
    1
    Views
    630

    Passing Parameters

    How do I pass a parameter from say the first row in my report to a sub report which displays everything that the parameter is associated with (e.g. an unique ID that is used in place of a name)....
  6. Replies
    11
    Views
    1,314

    Re: Testing primality of long doubles

    I didn't want to say with any certainty that a cast from 9.9999999978e10 to an int would always yield -2147483648.
  7. Replies
    11
    Views
    1,314

    Re: Testing primality of long doubles

    Cast from double to int on my computer yielded -2147483648.
  8. Replies
    71
    Views
    12,214

    Re: Break from a nested loop

    goto end_loop;
  9. Replies
    2
    Views
    769

    Re: ofstream problem (how do I do this)

    What?
  10. Replies
    11
    Views
    1,314

    Re: Testing primality of long doubles

    Last time I checked int ranges from -2147483648 (-2^31) to 2147483647 (2^31 - 1).

    If D is 9.9999999978e10 a static cast to an int would yield -2147483648



    #include <iostream>
    #include...
  11. Replies
    6
    Views
    1,244

    Re: Runtime virtual base class information

    Virtual inheritance allows you to cast a class that inherits other classes that inherit the same class.

    The following code does NOT compile.



    #include <iostream>

    class magic
    {
  12. Re: preincrement to prevent creation of temporaries?

    You got me before I saw I typed vector instead of iterator :P
  13. Re: preincrement to prevent creation of temporaries?

    I read what he linked to and it explained it. However, just for you I'll explain it.

    iterator operator ++ functions:


    _Mytype& operator++()
    { // preincrement
    _Inc();
    return (*this);...
  14. Re: preincrement to prevent creation of temporaries?

    std::vector<some type> c;
    for (std::vector<some type>::iterator i = c.begin(); i != c.end(); )
    if (<some condition>)
    i = c.erase();
    else
    ++i;


    Iterator does...
  15. Replies
    6
    Views
    809

    Re: C++ For Dummies

    This code compiled just fine for me too. Perhaps try replacing the pause with



    #include <iostream>

    int main(int argc, char* argv[])
    {
    std::cin.get();
  16. Replies
    15
    Views
    1,171

    Re: Class/Object Help

    You're right. My solution was not the only possible solution, but it was the simplest one and didn't involve in changing the classes he was provided for his class.
  17. Re: Constant array question? (Begginers question)

    I was just offering a solution to his problem. : * (
  18. Replies
    15
    Views
    1,171

    Re: Class/Object Help

    The problem is you are inserting the same location in memory each time you insert in your loop. I have fixed this by making f a pointer to a Polynomial and allocating memory each loop.



    int...
  19. Re: Constant array question? (Begginers question)

    Why use an array when some defines would do the trick? This would also save you the hassle of having to remember that roll_value[0] is two of a kind, roll_value[1] is three of a kind, etc.


    ...
  20. Thread: C++ Books

    by TheDominis
    Replies
    11
    Views
    1,532

    C++ Books

    I've been through C++ Without Fear by Brian Overland ( in ~6th grade - 5 years ago ) (http://www.amazon.com/Without-Fear-Beginners-Guide-Makes/dp/0321246950) and I have been doing random learning...
  21. Replies
    11
    Views
    5,450

    Re: C++ #include help

    As Paul pointed out when using an std::map when you use the operator[] it generates a new member at that value, if it doesn't exist. I could loop through the list from g = 0 to n but then n would...
  22. Replies
    11
    Views
    5,450

    Re: C++ #include help

    The current implementation of FindSmallestValue is



    #include <iostream>
    #include <vector>
    #include <map>

    int FindSmallestValue(std::vector<int>& vi, std::map<int,float>& vf)
    {
  23. Replies
    11
    Views
    5,450

    Re: C++ #include help

    Ajay Vijay and TheCPUWizard thanks for the tip. I originally wrote



    std::vector<Tile> getGrid() const
    {
    return grid;
    }
  24. Replies
    11
    Views
    5,450

    Re: C++ #include help

    Oh. I would have never thought of that. It's back to the std::map for me.

    -TheDominis
  25. Re: Shortest path algorithm with a maximum number of edges limit

    I think you just want a pathing algorithm. You can put the path into an array or container and make sure the size is above n.

    I suggest A*. Below is a link to a good tutorial.
    ...
Results 1 to 25 of 46
Page 1 of 2 1 2


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)