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

  1. Replies
    22
    Views
    686

    Re: __cplusplus number

    ssize_t as of C++20 is now a c++ type. It is a signed version of size_t. So if you are compiling as C++20 then you can't now define ssize_t as a type.

    So I guess you need something like:


    ...
  2. Replies
    1
    Views
    126

    Re: Something analagous to exp2f()

    exp2f() was introduced with C++11

    Re pow(). Yes and no. pow(2.0, 4) will effectively do the same job as exp2f(4), but returns a double and not a float (as 2.0 is of type double). To be pedantic on...
  3. Replies
    22
    Views
    686

    Re: __cplusplus number

    The c/c++ compiler/linker is cl.exe msbuild.exe is for the .net framework. clink.exe is no longer used.
  4. Replies
    22
    Views
    686

    Re: __cplusplus number

    auto_ptr was depreciated with C++11 and removed with C++17 as there were issues with it's implementation. Use either unique_ptr or shared_ptr as appropriate which are what replaced it.

    Any C++...
  5. Replies
    22
    Views
    686

    Re: __cplusplus number

    You need to use the _Zc option. See https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=msvc-160

    Note that for at least C++17 its 201703L and not 201709L
  6. Replies
    18
    Views
    4,135

    Re: A 'customised' std::list ??

    No. It's still marked as 'under investigation'. I guess they accept this as a bug, but that it's low on their priority list. When they'll get around to issuing a fix is really anyone's guess....
  7. Re: std::vector::emplace_back vs std::vector::push_back

    Consider this test class and the generated output from various uses of puish_back() and emplace_back():



    include <vector>
    #include <iostream>

    struct mytype {
    int a {};
    int b {};
  8. Re: std::vector::emplace_back vs std::vector::push_back

    emplace back enables the arguments of a class/struct constructor to be specified without the requirement to create another instance of the class.

    As a simple example, consider:



    #include...
  9. Replies
    4
    Views
    1,513

    Re: Creating a Virtual Desktop in Windows ?

    Sorry, I've never gone into virtual desktops. I just use virtual machines.

    However, Windows does support multiple Stations each with multiple Desktops. Would this be of any help? See...
  10. Re: How to use the TEA Algorithm to deal with human readable text

    As a simple example of use with a text file, consider this. It takes an input file in plain text, encrypts to an output file and then decrypts the output file to the decrypted file in plain text.

    ...
  11. Re: How to use the TEA Algorithm to deal with human readable text

    As I said in my previous post, TEA operates on 2 32-bit numbers. It takes 2 numbers as input and produces 2 numbers as output. If you want this to operate with text, then for encryption you have to...
  12. Replies
    4
    Views
    1,150

    Re: Catching OS exceptions

    You might find more info here https://docs.microsoft.com/en-us/windows/win32/debug/structured-exception-handling

    It seems there are various windows functions that can be used for dealing with...
  13. Replies
    4
    Views
    1,150

    Re: Catching OS exceptions

    I think you're referring to Microsoft SEH - which uses _try _except _finally. The options are set under Code Generation

    See...
  14. Re: How to use the TEA Algorithm to deal with human readable text

    So the contents of the input file is as given above? You are expecting the output file to be readable? What are expecting the output file to contain?

    decipher() returns 2 32-bit numbers via w...
  15. Replies
    5
    Views
    1,111

    Re: Memory leaks detected

    There are several issues with the code when using with union. The code below compiles and runs OK with VS2019:



    #include <vector>
    #include <string>
    #include <iostream>

    enum {INTEGER_TYPE =...
  16. Replies
    5
    Views
    1,111

    Re: Memory leaks detected

    Are you sure that ValuueType should be a union and not a struct? A union is a special class type that can hold only one of its non-static data members at a time. but in the constructor for ValuueType...
  17. Re: Resizing WinAPI Windows Console without text rearranging?

    Just looked into it. Appears you can't sub-class the windows console. Sorry.

    Have a look at:...
  18. Re: Resizing WinAPI Windows Console without text rearranging?

    Ah. You might be able to subclass the console window and trap the WM_SIZE message and ignore it et al. Not tried though.
  19. Re: Resizing WinAPI Windows Console without text rearranging?

    It will auto-adjust text in the console window between newlines (or begin newline/newline end) to suit the size of the window. This is a 'feature' of the console. If you have say a width of 80 with a...
  20. Replies
    1
    Views
    1,006

    Re: Destructors in C++

    class ctest {
    public:
    ctest(size_t sz) : ptrs(new int[sz]), sze(sz) {} // Constructor

    ~ctest() { delete[] ptrs; } // Destructor to delete allocated memory

    private:
    size_t sze {};...
  21. Replies
    12
    Views
    7,014

    Re: What book have you recently read?

    Currently reading the new best-seller by Rainer Grimm - C++20. Great read! Available from leanpub.com
  22. Re: Error: No Operator

    You haven't provided a compilable example. Are the 2 sets of code in different compilation units? if yes, is max_price() declared in a header file used by the compilation unit that has main() ?
  23. Re: Basic questions about VC runtimes and compatibility

    There is the c run time (CRT) and what is needed for MFC.

    For CRT, if this is statically linked, then the .exe includes the required CRT. For dynamically linked CRT, then the appropriate CRT...
  24. Re: Excel Crash using a new MS Office 365(16.0) ACEDAO.DLL

    The standard calling convention for c/c++ programs is __cdecl where the stack is cleaned up by the caller. Windows functions often use __stdcall where the stack is cleaned up by the callee (WINAPI is...
  25. Replies
    18
    Views
    4,135

    Re: A 'customised' std::list ??

    The Bug has now been reported to the VS team and is now 'Under Investigation'. I'll update when there is more info.

    Nice workaround! I'd never of thought of that as that using unused... line...
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)