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

Search:

Type: Posts; User: Richard.J

Page 1 of 47 1 2 3 4

Search: Search took 0.21 seconds.

  1. Replies
    2
    Views
    414

    Re: Winhttp Does Not Post File

    Since you are doing error checking, you should be able to tell where the code fails and you should also be able to get the error using GetLastError. That would at least be a starting point.
  2. Replies
    4
    Views
    874

    Re: Float point number simple arithmetic.

    https://www.phys.uconn.edu/~rozman/Courses/P2200_15F/downloads/floating-point-guide-2015-10-15.pdf
  3. Replies
    12
    Views
    1,057

    Re: Finding Doubles

    You could use a std::map<unsigned int, int> with the key the generated number and the value the occurence counter like in this example:
    https://en.cppreference.com/w/cpp/numeric/random
  4. Replies
    3
    Views
    445

    Re: Some code I don't understand

    Without more context, this looks like a constructor of a class timepos_t which takes a parameter of type samplepos_t and initializes a member variable called int62_t in the initiliazer list....
  5. Replies
    6
    Views
    3,778

    Re: Can't get libzippp working in 64 bit

    readAsText is exported by the DLL. I expect more of a compiler setting that causes a difference in the exported symbol and the expected one.
  6. Replies
    9
    Views
    3,103

    Re: Circular include problem

    Try this DBTestConnection.h


    #pragma once

    #include "TestConnection.h"
    #include "connection.h"
    //#include "SU_ORADB_imp.h"
    #include "oci.h"
    //#include "ConnectionFactory.h"
  7. Replies
    9
    Views
    3,103

    Re: Circular include problem

    A quick attempt to fix your problem did not lead to success.
    I would try the following:
    - disable the precompiled header
    - in each file that is reported to have errors: comment out all includes,...
  8. Replies
    22
    Views
    3,583

    Re: __cplusplus number

    An entry like this should work in a .props file:
    <ItemDefinitionGroup>
    <ClCompile>
    <AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
    </ClCompile>
    ...
  9. Replies
    4
    Views
    1,850

    Re: Catching OS exceptions

    The second link in 2kaud's post #2 seems to imply that /EHa might be what you are looking for. I don't have experience with this, either.
  10. Replies
    3
    Views
    801

    Re: :: operator new()

    https://en.cppreference.com/w/cpp/memory/new/operator_new
    section "Class-specific overloads":
    "If defined, these allocation functions are called by new-expressions to allocate memory for single...
  11. Replies
    4
    Views
    1,333

    Re: Strange problem with Windows Sockets

    Not sure what inet_addr makes with leading zeros, but maybe that is a problem? As Victor's example shows, ping takes leading zeros as indication of a number in octal format.
  12. Re: Strange '_JustMyCode_Default' error with VS2019

    We are using hippomock for our unit testing, and we had to set this property to "yes" on a Windows Server 2016 or our Windows API mocks weren't called. No-one figured out why.
  13. Thread: libiconv

    by Richard.J
    Replies
    6
    Views
    1,760

    Re: libiconv

    Does this help?
    http://www.gnu.org/software/libiconv
  14. Replies
    8
    Views
    5,175

    Re: map name does not name a type error

    Most likely, you cannot add elements to the map outside any function, i.e. in the global scope.
    However, something like this should work:


    map<string, unsigned int> electron_lookup{
    {"C",...
  15. Re: How to iterate over a vector of many stucts

    If you want to stick to the iterator approach:


    for (BriteNodeInfoList::iterator it = m_briteNodeInfoList.begin(), endIt = m_briteNodeInfoList.End(); it != endIt; ++it)
    {
    os << it->nodeId...
  16. Replies
    11
    Views
    3,100

    Re: How smart is the compiler?

    I don't think that any of the proposed solutions are really readable.
    What about the use of exceptions? If any of the operations throw an exception in the case of an error, the calling function...
  17. Replies
    1
    Views
    5,172

    Re: boost thread pool execution

    Not sure about the thread pool functionality, but I assume your main() functions returns before any of the threads had a chance to execute.
  18. Replies
    2
    Views
    3,231

    Re: Need help with undefined reference

    You have forward declared and are using a function binarySearch with 3 parameters, but the definition of the method in your code has 5 parameters. Thus the error message.
  19. Re: Allocating and copying memory in one go...

    John, did you consider realloc?
  20. Re: Forcing a socket to die so it can be reopened

    After creating the socket, use setsockopt with SO_REUSEADDR


    int enable = 1;
    setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(int));
  21. Replies
    12
    Views
    2,639

    Re: File Extension ".S"

    Does this link help?
    https://msdn.microsoft.com/de-de/library/afzk3475.aspx
  22. Thread: find_if

    by Richard.J
    Replies
    2
    Views
    5,658

    Re: find_if

    The find_if algorithm iterates over the elements of the container. In your case, the container is map<TDummyKey,TDummy>, and each element in the container is a pair<const TDummyKey, TDummy>.
    Your...
  23. Re: Socket Programming -- Sending image and received notice.

    I assume your server is not listening on port 50007, since you #define'd SERVER_PORT htons(50007).
    You can verify this by using TcpView (or netstat) and check what port your server is listening on....
  24. Re: How to create a function for storing object in map?

    A common index to be used in different kinds of maps seems odd to me. In addition, your Create method must take a M& to work correctly (like in laserlight's example).
    Apart from that, I am not sure...
  25. Re: How to create a function for storing object in map?

    All you need is the correct definition of your Create method


    void Create(std::map& map, const Account& object) const

    This assumes that Create does not modify the object passed into it and...
Results 1 to 25 of 1160
Page 1 of 47 1 2 3 4





Click Here to Expand Forum to Full Width

Featured