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

Search:

Type: Posts; User: 2kaud

Page 1 of 80 1 2 3 4

Search: Search took 0.09 seconds.

  1. Replies
    3
    Views
    47

    Re: Slow performances using Bitmap/GDI

    You can replace the for loop with memcpy(). See http://msdn.microsoft.com/en-us/library/dswaw1wk.aspx
  2. Replies
    1
    Views
    80

    Re: cyclic thread with speicifc time interval

    You might find this of interest re waitable timers
    http://msdn.microsoft.com/en-us/library/windows/desktop/ms686898%28v=vs.85%29.aspx
    together with its links.
  3. Replies
    6
    Views
    1,031

    Perl Re: Running a system command

    As the rest of the project seems to be in c++, why not rewrite the perl script in c++?
  4. Re: Given an array of denominations, how many combinations of coins to sum total cent

    Another way of doing this is to generate all the permutations of the number and then return the one after. One way of doing this in c++ is


    #include <iostream>
    #include <algorithm>
    #include...
  5. Replies
    7
    Views
    153

    Re: WM_INPUT Failing to Detect Arrow Keys

    The problem is that RI_KEY_MAKE is defined to be 0 so could be taken to be this whatever the value of Flags. One way to test for up/down is


    Face_right = !(raw->data.keyboard.Flags & RI_KEY_BREAK...
  6. Replies
    7
    Views
    153

    Re: WM_INPUT Failing to Detect Arrow Keys

    and raw is defined as what and is given a value from where? It would be more helpful if you posted a complete short program that demonstrated the issue.

    What is the value of data.keyboard.Flags?
  7. Thread: C++ Challenge

    by 2kaud
    Replies
    5
    Views
    122

    Re: C++ Challenge

    If you have been following a course of study then you should at least have some ideas about how to start at least one of the programs. There have been several postings in these forums from students...
  8. Replies
    3
    Views
    144

    Re: Function of the same name as the class

    A class function with the same name as the class is a constructor for the class and is called when the class is instantiated.
    In your example above,


    Rectangle rec(10,7);

    calls

    ...
  9. Replies
    6
    Views
    147

    Re: Beginner- simple question

    if you put


    #include <conio.h>

    at the top of the program, then you can use


    getch();
  10. Replies
    6
    Views
    147

    Re: Beginner- simple question

    There are various ways of doing this. One way is to add at the end


    char ch;
    cin >> ch;

    or


    cin.get();
  11. Re: What book is well-suited for windows 7 shell programming?

    Slightly dated but worth having a look at
    Visual c++ Shell Programming...
  12. Thread: Learner in C++

    by 2kaud
    Replies
    4
    Views
    148

    Re: Learner in C++

    You might also like to look at these sites
    http://www.codeproject.com/
    http://www.cplusplus.com/
    http://www.tutorialspoint.com/cplusplus/index.htm
    http://www.parashift.com/c++-faq/...
  13. Replies
    47
    Views
    1,138

    Re: Ising Model C++ Metropolis Algorithm

    No

    If delta_E <= 0 then flip
    if delta_E > 0 then flip if exp(-delta_E) > random_number_0_to_1

    When evaluating logical or conditions, the left hand expression is evaluated first. If this is...
  14. Replies
    47
    Views
    1,138

    Re: Ising Model C++ Metropolis Algorithm

    if (delta_E <= 0 || ((double)rand() / (double)(RAND_MAX)) < (double)exp((double)-delta_E))

    the if condition is a logical or. If either or both of the seperate conditons (left and right of the ||)...
  15. Replies
    47
    Views
    1,138

    Re: Ising Model C++ Metropolis Algorithm

    To store data in a file, you first need to open the file for writing and then output data to the file. Data can be written to the file using stream insertion (just like << for cout).
    See...
  16. Thread: C++ Challenge

    by 2kaud
    Replies
    5
    Views
    122

    Re: C++ Challenge

    What are the problems you are experiening in trying to produce one of these programs yourself? Assuming the maths/physics of the problem is known, the actual programming is fairly simple. If you had...
  17. Re: boost serialization of nested struct does not work in c++

    Before posting please format the code properly and use code tags so that the code is readable. Go Advanced, select the formatted code and click '#'.
  18. Re: How can I reference a static variable in another file?

    Yes.
  19. Re: How can I reference a static variable in another file?

    As g_navMesh is defined as static in the master file, this means that it can't be referenced from another module as it has internal linkage. See http://msdn.microsoft.com/en-us/library/s1sb61xd.aspx...
  20. Replies
    17
    Views
    213

    Re: One Question Polls

    Each time you put up a new poll would you post a message to this forum please so that I know then to re-configure Firefox so that I can see the poll and respond. Thanks.
  21. Replies
    47
    Views
    1,138

    Re: Ising Model C++ Metropolis Algorithm

    Well as long as it seems then that's all right then? Have you tested it to make sure it gives the answers expected? I don't think it will as x and y are only set once at the beginning of the program...
  22. Replies
    4
    Views
    165

    Re: initializing a POD bitfield struct

    Why not define a constructor for S that performs the initialisation?



    #include <iostream>
    using namespace std;

    struct S
    {
    unsigned int a : 1;
  23. Replies
    4
    Views
    206

    Re: GetStdHandle() (Windows 8 / 8.1)

    I can confirm that from a Windows app, your code returns NULL for GetStdHandle() for Windows 8.1. Try putting AllocConsole() before as a console hasn't been allocated.
  24. Replies
    47
    Views
    1,138

    Re: Ising Model C++ Metropolis Algorithm

    Fine. So just do the quick change to the code so that it matches what you want to do and then you'll have it.
  25. Replies
    6
    Views
    125

    Re: read serial port using libserial....

    //check the response...
    while(My_String == ERROR) {


    What is the value of My_String here and what is the value/type of ERROR?
Results 1 to 25 of 2000
Page 1 of 80 1 2 3 4


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