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. Re: Problem with vector?

    This compiles and runs OK with VS2019:



    #include <vector>
    #include <string>
    using namespace std;

    struct ST1 {
    string abc;
  2. Re: Problem with vector?

    Is it now working?

    What are the sizes of the vectors?
    Which compiler version are you using?



    for(int j=1;..)
    vec1.push_back(ST1{..,..,..}); //ok
    }
  3. Re: Does #define change things that come before it?

    Definitions can be changed within a compilation unit. You can undefine a definition and re define it. The new definition takes effect from then until the end or until it is undefined or redefined.
    ...
  4. Replies
    16
    Views
    1,009

    Re: Find cartesians for matrix elements

    Presumably not.......
  5. Replies
    3
    Views
    457

    Re: How to initialize variant?

    using mytype=std::variant<int, double, int>;


    No. You are specifying int twice. You only specify the different types that the variant might hold, not their order or number.



    mytype...
  6. Replies
    16
    Views
    1,009

    Re: Find cartesians for matrix elements

    As this is not a C++ question, but an algorithm question - the only help I can provide is to suggest that first you solve this using pen/paper to develop the algorithm. Once you produce what you...
  7. Re: Does #define change things that come before it?

    The scope of the defined buff_Small is only within the function - before the #define
  8. Re: Does #define change things that come before it?

    No. The pre-processing is a one pass over the source file to expand macro uses. A macro is only known from its point of definition. It's not a 2-pass with one pass obtaining the definitions and the...
  9. Replies
    16
    Views
    1,009

    Re: Find cartesians for matrix elements

    See https://stackoverflow.com/questions/29451291/cartesian-product-in-c re info about generating cartesian product sets.

    Also
    https://gist.github.com/Alexhuszagh/67efb078a82616ed07529ed97586646a...
  10. Thread: Hello!

    by 2kaud
    Replies
    1
    Views
    722

    Re: Hello!

    Well hi to you to :wave:
  11. Replies
    18
    Views
    1,672

    Re: How to get instance Excel2016?

    The installed path for Excel can be obtained from the registry:

    HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\Excel.exe\path
  12. Replies
    18
    Views
    1,672

    Re: How to get instance Excel2016?

    The path for excel10 and excel16 will be different. You need to find the installed paths for your system and use them as appropriate.
  13. Replies
    9
    Views
    1,357

    Re: Unable to compile

    [Split into two posts as different issues. See https://forums.codeguru.com/showthread.php?565504-Unable-to-compile ]
  14. Replies
    9
    Views
    1,357

    Re: Unable to compile

    He should have removed everything on that line after the \ but keeping the \

    When \ is used as the line continuation char as it is here, there can't be any chars after it (other than \n) -...
  15. Replies
    9
    Views
    1,357

    Re: Unable to compile

    The first error is L8 - which if the lines match your previous attachment is



    #import "C:\\Program Files\\Microsoft Office\\Office14\excel.exe" \ // OK on Office PC ....MsOffice in Home PC

    ...
  16. Replies
    12
    Views
    1,092

    Re: Unable to compile

    AFAIK VS2013 is now not supported by MS. So basically 'use at your own risk'.

    Remove VS2013, install VS2019.

    stdafx.cpp is used by PreCompiled Headers. In properties/c++/pre-compiled Headers,...
  17. Thread: wcscpy_s problem

    by 2kaud
    Replies
    5
    Views
    994

    Re: wcscpy_s problem

    To retrieve the exe's name inside a windows program (it's easy for main() as it's argv[0]), use GetCommandLine()

    See...
  18. Thread: wcscpy_s problem

    by 2kaud
    Replies
    5
    Views
    994

    Re: wcscpy_s problem

    Yeah, the syntax of wcscpy_s (and others!) changes as to whether you're compiling as c or c++ - and if for C++, can the template version determine the size of the destination.

    If the size of the...
  19. Replies
    10
    Views
    2,137

    Re: Filter a txt file based on an Excel template

    Sorry, but I haven't time at the moment to look further into this for a few weeks. It's probably possible as you're just reading values from an array obtained from spreadsheet(s) and filtering the...
  20. Replies
    4
    Views
    2,278

    Re: Free is getting called for string object

    Haven't tried across a dll - but there are issues re using std::containers across .dlls. Not advised.
  21. Replies
    4
    Views
    2,278

    Re: Free is getting called for string object

    OK. This compiles and runs OK with VS2019



    #include <string>
    #include <iostream>

    class Status
    {
    public:
  22. Replies
    4
    Views
    2,492

    Re: Stupid Things Developers Do

    and then find out it's actually your code......
  23. Thread: I'm back!

    by 2kaud
    Replies
    5
    Views
    2,556

    Re: I'm back!

    This forum is now very quiet compared to what it was a few years ago. From 14 years ago, there's possibly only Arjay and Victor still around. I've only been around a mere 9 years...
  24. Replies
    6
    Views
    3,639

    Re: Can't get libzippp working in 64 bit

    The code that produces the .lib/.dll files needs to be re-compiled with your compiler using the same settings as for your main code. This is C++ 'name mangling'. The whole name must match exactly....
  25. Replies
    6
    Views
    3,639

    Re: Can't get libzippp working in 64 bit

    Use dumpbin /exports filename.lib to see the exported names from the .lib file
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)