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

  1. Re: Strange '_JustMyCode_Default' error with VS2019

    Thanks for the heads-up tip re Just My Code property. My default is no and I have never changed it. :thumb:
  2. Replies
    24
    Views
    1,453

    Re: Excel writing time is inconsistent.

    That's another way to approach this issue. Create the required spreadsheet using Excel automation from C++/VB.net/c#
  3. Thread: example program

    by 2kaud
    Replies
    4
    Views
    161

    Re: example program

    Traits is a templated struct. It does nothing but introduce the Traits structure.

    Specialised templates are then used for type Fruit and type Color. If the templated type is Fruit then the Fruit...
  4. Replies
    24
    Views
    1,453

    Re: Excel writing time is inconsistent.

    You might get better performance creating the spreadsheet outside of Excel using a tool such as Aspose Cells. See https://products.aspose.com/cells Although this is not a free solution 30-day...
  5. Thread: example program

    by 2kaud
    Replies
    4
    Views
    161

    Re: example program

    This code doesn't compile with VS2019. There's a definition of Traits missing as the static function name() is used but not defined. Assuming name() is supposed to return a string with the equivalent...
  6. Replies
    24
    Views
    1,453

    Re: Excel writing time is inconsistent.

    Ah. The generated spreadsheet from the xml file contains 170 sheets with many sheets containing images. All are heavily formatted as Engineering description pages. My previous experience of improving...
  7. Re: Filter a txt file based on an Excel template

    I've now had a look at this. Sorry, but I don't understand the requirement. If you're unable to provide working VBA code for conversion to C++ as previously, you're going to have to be much more...
  8. Re: Filter a txt file based on an Excel template

    It's not homework. In a previous thread (https://forums.codeguru.com/showthread.php?565022-RESOLVED-Filter-a-txt-file-based-on-an-Excel-data-sheet&p=2237550&highlight=#post2237550) I converted some...
  9. Replies
    7
    Views
    1,047

    Re: Creating a Directory

    Colon is also used to name an alternate NTFS file stream. See http://www.flexhex.com/docs/articles/alternate-streams.phtml
  10. Replies
    24
    Views
    1,453

    Re: Excel writing time is inconsistent.

    The OP won't/hasn't posted the XML file and the VB script. So....

    In these cases, I'd be looking to read/process the XML file separately to (outside of) Excel, to produce say a csv file that can...
  11. Replies
    21
    Views
    1,303

    Re: replace with sort algorithm

    The code you have will probably give the best performance. In 'simplifying' this, you are likely to have an impact on performance. In these sort of cases, I'd be thinking about performance over...
  12. Replies
    21
    Views
    1,303

    Re: replace with sort algorithm

    For the original SortInfo(), this can be a little simplifed:



    void SortInfo(CS* pS, TECH eTechType, PiInfo* pIIInfo, MiInfo* pMInfo, size_t x, size_t y)
    {
    const size_t minIndex =...
  13. Replies
    21
    Views
    1,303

    Re: replace with sort algorithm

    Sorry I can't help with this as I don't use boost.

    But as a comment, aren't you in danger of replacing something 'complicated' with something that's could be equally as complicated with a worst...
  14. Replies
    24
    Views
    1,453

    Re: Excel writing time is inconsistent.

    To parse and generate the Excel file shouldn't take anywhere near 30 minutes - never mind over an hour.

    Can you post an XML file, the VB script and a link to a generated Excel file. There's...
  15. Replies
    21
    Views
    1,303

    Re: replace with sort algorithm

    AFAIK, you can't. You can't assume anything about sort/qsort other than the provided function will get 2 values to compare. Even if somehow you found something, that may well change with the next...
  16. Replies
    21
    Views
    1,303

    Re: replace with sort algorithm

    Nope.
  17. Replies
    21
    Views
    1,303

    Re: replace with sort algorithm

    Not really. t1 stored in stack space and not heap space - so t1 is a ref to a temp variable used in the sort algorithm.
  18. Replies
    24
    Views
    1,453

    Re: Excel writing time is inconsistent.

    But you haven't answered my question in post #5 re the size of the XML file and the size of the excel spreadsheet.

    Is there anything else being done on these computers while this is being done?
    ...
  19. Replies
    21
    Views
    1,303

    Re: replace with sort algorithm

    But if you sort pIIInfo, then you won't know which pMInfo elements need to be swapped - will you?
  20. Replies
    24
    Views
    1,453

    Re: Excel writing time is inconsistent.

    What is the size of the XML? What is the size of the resultant excel (rows/columns?). Is the version of Excel the same on both machines? What are the specs of both machines(cpu/memory/type of drive...
  21. Replies
    6
    Views
    1,388

    Re: header files online database

    vector is a C++ container. If you have reference to a vector in C code, then you'll need to obtain the definition as it probably won't be the same/have the same interface as the C++ one.

    You could...
  22. Replies
    21
    Views
    1,303

    Re: replace with sort algorithm

    This looks like a quicksort.

    It seems to be be sorting pIIInfo. To use std::sort, you need to specify the begin and end iterator and define an operator<(a, b).

    Where does pMInfo fit into this?...
  23. Thread: Matrix input

    by 2kaud
    Replies
    22
    Views
    1,282

    Re: Matrix input

    So did I in the code in my post #18!

    As well as begin/end, cbegin/cend, there are also rbegin (reverse iterator - starts at the end and iterators to the start) & rend. Use them just like begin/end...
  24. Thread: Matrix input

    by 2kaud
    Replies
    22
    Views
    1,282

    Re: Matrix input

    Sorry. I looked at the code and didn't see the same problem you didn't see. You're got the order of the parameters wrong. Should be:



    std::transform(r1->begin(), r1->end(), r2->begin(),...
  25. Thread: Matrix input

    by 2kaud
    Replies
    22
    Views
    1,282

    Re: Matrix input

    What about



    std::transform(r1->begin(), r2->begin(), r1->end(), back_inserter(r), [](int i, int j)


    transform requires an iterator - not a const_iterator. That's probably what the compiler...
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)