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

  1. Replies
    9
    Views
    441

    Re: Circular include problem

    Provide a minimal test compilable program that shows the problem - one .cpp file of at most a couple of dozen lines (no .h files etc) that can be pasted here and copy/pasted easily into the compiler....
  2. Replies
    9
    Views
    441

    Re: Circular include problem

    How and where are you using imp_ ? Can you provide a minimal test compilable program that shows the problem.
  3. Replies
    9
    Views
    441

    Re: Circular include problem

    Is this a circular class reference problem - both classes referring to each other?

    If yes, then you need to forward declare one class before it is used in the other. Note that if this is the...
  4. Replies
    22
    Views
    1,513

    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:


    ...
  5. Replies
    1
    Views
    462

    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...
  6. Replies
    22
    Views
    1,513

    Re: __cplusplus number

    The c/c++ compiler/linker is cl.exe msbuild.exe is for the .net framework. clink.exe is no longer used.
  7. Replies
    22
    Views
    1,513

    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++...
  8. Replies
    22
    Views
    1,513

    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
  9. Replies
    18
    Views
    4,950

    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....
  10. 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 {};
  11. 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...
  12. Replies
    4
    Views
    1,902

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

    ...
  14. 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...
  15. Replies
    4
    Views
    1,238

    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...
  16. Replies
    4
    Views
    1,238

    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...
  17. 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...
  18. Replies
    5
    Views
    1,236

    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 =...
  19. Replies
    5
    Views
    1,236

    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...
  20. 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:...
  21. 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.
  22. 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...
  23. Replies
    1
    Views
    1,202

    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 {};...
  24. Replies
    12
    Views
    7,417

    Re: What book have you recently read?

    Currently reading the new best-seller by Rainer Grimm - C++20. Great read! Available from leanpub.com
  25. 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() ?
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)