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

  1. Replies
    6
    Views
    202

    Re: Fundamental question- C++ learner

    Yes. My bad. :o It was originally new int and I changed it to double int. Doh!!!!!



    Agreed, but the OP gave no hint of knowing about vectors.
  2. Replies
    8
    Views
    186

    Re: Hash Table Problems

    Please use code tags when posting code as you did in your post #1.

    What has testing movie.MPAC for 0 got to do with collision? movie.MPAC is the MPAC of the movie read from the file and won't be...
  3. Replies
    8
    Views
    186

    Re: Hash Table Problems

    Ok. I've got your program compiled and running. From where does your output get displayed - and why do you think its wrong that casablanca displays at the end of the output? Work through the various...
  4. Replies
    8
    Views
    186

    Re: Hash Table Problems

    What trouble, how is it nor working properly - is this compile error or run-time issue? What is the error message or change from expected output?



    What debugging of the program have you done?...
  5. Replies
    6
    Views
    223

    Re: reading from a txt file that's a record

    amountSpent = atoi(lines[4].c_str());

    should use atof() here as amountSpent is of type double.

    I've tidied up the code a bit and added a search on users for surname which displays the details...
  6. Re: Vector subscript out of range- error whilst debugging

    ?? :confused:
  7. Replies
    6
    Views
    202

    Re: Fundamental question- C++ learner

    See http://www.tutorialspoint.com/cplusplus/cpp_dynamic_memory.htm where the code in the OP post #1 is shown.

    An 'easier' way in c++11 would be


    auto pvalue = new double[3][4];

    which...
  8. Thread: Wombat 1

    by 2kaud
    Replies
    5
    Views
    310

    Re: Wombat 1

    For what? How far have you got with your coding as per your top level design as per your post #4?
  9. Replies
    6
    Views
    190

    Re: DC Circuits Program,need help

    If you are giving the users a choice of how many resistors, you might want to consider different numbers for series and parallel. There are several of ways of doing this. One is to ask for the user...
  10. Replies
    6
    Views
    202

    Re: Fundamental question- C++ learner

    double** pvalue = NULL; // Pointer initialized with null
    pvalue = new double [3][4]; // Allocate memory for a 3x4 array

    This is a c++11 way of allocating memory for multi-dimension arrays. As you...
  11. Replies
    6
    Views
    190

    Re: DC Circuits Program,need help

    Your menu selection code can be simplied. Try this


    int main()
    {
    char selection;

    while (true)
    {
    printMenu();
  12. Replies
    6
    Views
    190

    Re: DC Circuits Program,need help

    The formula for parallel resistance is 1/RT = 1/r1 + 1/r2 + 1/r3 + ... So if a value entered is 0, just don't add in its reciprical for the parallel sum.


    for (int j = 0; j < maxResRP; j++)
    {...
  13. Replies
    8
    Views
    221

    Re: Function of the same name as the class

    That's fine (use Help/About for more specific info). The debugger is specific to the compiler. There's Visual Studio xxx, gcc etc for different compilers.
  14. Re: Finding the common node of 2 linked lists, without checking the length

    As far as I can see, whether m and n are the lengths of the lists up to the intersection point or the full lengths doesn't really matter for at least one of the possible solutions - unless I'm...
  15. Re: what is the use of PUBLIC_DECL here and what is it?

    I suspect that PUBLIC_DECL is a definition defined elsewhere (in a header file?) and could possibly be
    __declspec(dllexport)
    or
    __declspec(dllimport)

    depending upon whether the class is being...
  16. Replies
    8
    Views
    221

    Re: Function of the same name as the class

    Use the debugger to trace through the program to see the order of execution then you'll see which comes first. The ability to use the debugger is an essential skill that a programmer needs to master...
  17. Re: Finding the common node of 2 linked lists, without checking the length

    It's probably an exercise as there seems to be several internet solutions available from a simple google search.
  18. Replies
    6
    Views
    223

    Re: reading from a txt file that's a record

    If you want to add sorting and searching then I would suggest that you read the whole file into a container such as a vector (http://www.cplusplus.com/reference/vector/vector/) and use STL to do the...
  19. Replies
    2
    Views
    117

    Re: Truncated Gaussian Distribution

    and your c++ question is? If you are asking about algorithms regarding statistial distribution, you might get more replies if you posted to the algorithm forum...
  20. Replies
    6
    Views
    223

    Re: reading from a txt file that's a record

    books.read(reinterpret_cast<char *>(&listed),sizeof(listed));

    This will only read sizeof(listed) bytes from the file which is not what you want. The size of the class is different from the size of...
  21. Replies
    15
    Views
    283

    Re: Slow performances using Bitmap/GDI

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

    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.
  23. Replies
    6
    Views
    1,084

    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++?
  24. 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...
  25. Replies
    7
    Views
    188

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