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

  1. Re: Test return value - invalid conversion from 'int' to 'LPCSTR {aka const char*}'

    What's your level of knowledge of C++?

    The two general C++ books I'd suggest are:

    Beginning C++20 by Ivor Horton
    Professional C++ by by Marc Gregoire (5th Edition coming 7 Jan 2021)

    Also...
  2. Re: Test return value - invalid conversion from 'int' to 'LPCSTR {aka const char*}'

    The issue's not really function calling, it's understanding variable scope. A variable is only valid within the block it's declared. Outside of that block it's undefined.

    szpath is defined with...
  3. Re: coming up with data structure for the algorithm

    Sorry for the late reply - which is possibly less helpful than expected. We've pulled out with work at the moment...

    IMO, I'd take a sub-set of the data, work through it be hand using pen/paper...
  4. Re: Test return value - invalid conversion from 'int' to 'LPCSTR {aka const char*}'

    If GetShortcutTargetPath() is only used once, then within that function make szPath static. Also set szpath[0] = 0 at the start of the function so if it fails the value is a null.
  5. 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:
  6. Replies
    24
    Views
    2,238

    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#
  7. Thread: example program

    by 2kaud
    Replies
    4
    Views
    348

    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...
  8. Replies
    24
    Views
    2,238

    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...
  9. Thread: example program

    by 2kaud
    Replies
    4
    Views
    348

    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...
  10. Replies
    24
    Views
    2,238

    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...
  11. 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...
  12. 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...
  13. Replies
    7
    Views
    1,205

    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
  14. Replies
    24
    Views
    2,238

    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...
  15. Replies
    21
    Views
    1,650

    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...
  16. Replies
    21
    Views
    1,650

    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 =...
  17. Replies
    21
    Views
    1,650

    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...
  18. Replies
    24
    Views
    2,238

    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...
  19. Replies
    21
    Views
    1,650

    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...
  20. Replies
    21
    Views
    1,650

    Re: replace with sort algorithm

    Nope.
  21. Replies
    21
    Views
    1,650

    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.
  22. Replies
    24
    Views
    2,238

    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?
    ...
  23. Replies
    21
    Views
    1,650

    Re: replace with sort algorithm

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

    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...
  25. Replies
    6
    Views
    1,569

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