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

  1. Replies
    5
    Views
    167

    Re: Compression error

    That explains the use of size_t rather than DWORD and why the cast is required. Note that both size_t and DWORD are unsigned types so care has to be taken with decrement as you can't have a negative...
  2. Replies
    5
    Views
    167

    Re: Compression error

    If nsize = 1, ncount = 4 then

    stwritten = 0
    sttotal = 4 * 1 = 4
    stremain = 4

    stwritten < sttotal
    dwwritecount = 0
    dwwritten = ?? (say 987654)
  3. Re: VB5 program acquires virus when uploaded to Web

    See https://en.wikipedia.org/wiki/Code_signing

    Also try it with https://www.virscan.org/language/en/ This scans the specified file using 49 different virus scanners.
  4. Re: VB5 program acquires virus when uploaded to Web

    Does this happen for any user-written .exe or just this one - have you tried just a simple 'hello world' program? Is the program being rejected because it is downloaded and isn't signed?
  5. Replies
    1
    Views
    164

    Re: Acceptable Usage Policy

    Now fixed - is that a record?
  6. Replies
    1
    Views
    164

    [RESOLVED] Acceptable Usage Policy

    The link to the AUP is broken http://forums.codeguru.com/aup.html
  7. Replies
    15
    Views
    527

    Re: debug in release mode

    Re-build the soultion using Debug mode. Release mode strips away debug info etc and does code optimisation. You should only compile as Release when you're happy with the solution - for final testing...
  8. Re: [RESOLVED] Namespace problem with older version of MSVC

    That 'trick' is also useful if the arguments are of different types:



    std::min(1, 2U);


    won't compile as the 1st arg is int, the second is unsigned int - so template type deduction reports...
  9. Re: [RESOLVED] Namespace problem with older version of MSVC

    Another way is to specify the type for the template- again so that the **** pre-compiler won't confuse with a macro!



    std::min<int>(1, 2);
  10. Thread: Rust

    by 2kaud
    Replies
    8
    Views
    537

    Re: Rust

    The problem for 'Joe programmer' is that the committee considers proposals for word changes to the standard to bring new ideas into the language. There's no restriction on who can submit, but the...
  11. Replies
    4
    Views
    363

    Re: Why doesn't this code compile?

    template <class U>
    static yes_type test(U&, decltype(U(source<U>()))* = 0);


    This looks like a function declaration with name test. The first parameter is U& and the second is an optional...
  12. Thread: Rust

    by 2kaud
    Replies
    8
    Views
    537

    Re: Rust

    IMO I wouldn't hold your breath on this. There is an ISO working group/committee (WG21 - chaired by Herb Sutter from MS) which deals with the standard (as C++ is an ISO standard). The members are...
  13. Thread: Rust

    by 2kaud
    Replies
    8
    Views
    537

    Re: Rust

    For over the past 25 years I've only used c/c++ - so I'm a little Rusty on the languages I used before then so can't comment. :)
  14. Replies
    1
    Views
    362

    Re: What is virtualize? -edited

    Look it up in Wikipedia - https://en.wikipedia.org/wiki/Virtualization
  15. Replies
    8
    Views
    2,775

    Re: MFC GDI+ loading ttf font resource

    case 1:
    fResource = IDR_MYFONT_1FEDRA;
    case 2:
    fResource = IDR_MYFONT_3FEDRA;
    case 3:
    fResource = IDR_MYFONT_5FEDRA;


    You are missing the break statements after the assignments!
  16. Replies
    1
    Views
    1,055

    Re: Hey everyone nice forum :)

    Welcome to codeguru :wave:
  17. Replies
    4
    Views
    3,354

    Re: VS2019 Upgrade to 16.6.0 major issue

    Even with 16.6.1, issues regarding the upgrade are still being reported.16.6.1 seems to work OK for some but not for others.

    See...
  18. Replies
    19
    Views
    3,836

    Re: sending and receiving file from socket

    As this thread is nearly 13 years old, I suggest you start a new thread detailing your specific issue.
  19. Replies
    1
    Views
    1,723

    Re: C++ new specification syntax problem

    Try removing constexpr from the #defines.
  20. Re: Exception when the second list element size =1

    Note that .insert() within an iterator loop can have a similar - but different- issue and needs to be considered on a case-by-case basis depending upon the container type and location of insertion.
  21. Re: Exception when the second list element size =1

    It is returning end(). However:

    - for 1 or more elements, end() returns 1 past the last element
    - for no elements, end() returns begin()

    This is so that the standard iterator for statement:
    ...
  22. Re: Exception when the second list element size =1

    Using very long names within the code makes the code very hard to read and understand! Yes, names should be meaningful but also easy to read. IMO I suggest a limit of about 15.

    Using structured...
  23. Re: Exception when the second list element size =1

    The way to erase elements from a container is:



    include <list>
    #include <iostream>

    int main()
    {
    std::list<int> lst {3, 2};
  24. Replies
    4
    Views
    3,354

    Re: VS2019 Upgrade to 16.6.0 major issue

    This issue is now supposedly fixed in release 16.6.1
  25. Thread: DLL C++ and C#

    by 2kaud
    Replies
    7
    Views
    895

    Re: DLL C++ and C#

    The c/c++ dll should look something like (not tested):



    _declspec(dllexport) void __stdcall Mytest(char* buf, int buflen)
    {
    char szSampleString[] = "Hello World";
    ...
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




On-Demand Webinars (sponsored)