Search:
Type: Posts; User: 2kaud
Search:
Search took 0.14 seconds.
-
Try the sister vb site which has a more active VB forum.
https://www.vbforums.com/forumdisplay.php?25-Visual-Basic-NET
-
Then just do it as per the suggested function in post #4
For m_nId2, just extend the condition check in the function.
-
std::unique() removes duplicate entries - which is not what you want as duplicates are allowed. You need std::find_if() with the predicate lambda to check m_nId == <required value> this will iterate...
-
You mention adding a warning message - so you want to insert the item even if m_nId is a duplicate?
Is the vector sorted by m_nID?
Unless the vector is sorted by m_nID, then adjacent_find() is...
-
1) Pass by const ref - so not passed by value, so no copy of the passed argument undertaken. In general unless a copy is required, only POD types (int, char etc) are passed by value - others are...
-
January 16th, 2021, 12:51 PM
I would code it as this which also includes an overload so that the contents of myVec can be displayed:
#include <iostream>
#include <initializer_list>
#include <stdexcept>
#include...
-
January 16th, 2021, 12:16 PM
OK. There is an ordering error in the initializer list constructor. The order of initialisation must be the same as the order the variables are defined. So you need as you're using sz before it's...
-
January 16th, 2021, 11:57 AM
What os/compiler are you using? This compiles and runs OK with VS2019. I've only added an include for initialiser list.
#include <iostream>
#include <stdexcept>
#include <initializer_list>
...
-
January 16th, 2021, 05:09 AM
[Attachment Link is invalid]
-
January 11th, 2021, 01:03 PM
That still gives the compiler warning - as it's just the same as the (WORD*) c-style cast.
-
January 11th, 2021, 12:42 PM
You are compiling as 64bit - Compiler warning C4312 - 'type cast': conversion from 'INT' to 'WORD *' of greater size is only issued when trying to assign a 32-bit value to a 64-bit pointer type, for...
-
January 8th, 2021, 12:24 PM
As a set is sorted, you can't change it's key (value) as that would change the ordering. You need to erase (or extract for C++17) and insert.
include <iostream>
#include <algorithm>
#include...
-
January 8th, 2021, 04:46 AM
Whilst this solution will prevent the non-required duplicate entries, it will have an adverse effect on performance - as the multiset is effectively traversed twice - once to see if the cell doesn't...
-
January 6th, 2021, 12:12 PM
Sorry, I got my count wrong :blush:
Offset 28 is MXCSR_MASK
From the manual page 284:
This is what mxcsr_mask & (1<<6) is doing. It's testing if bit 6 is set - ie denormals-are-zero mode...
-
January 6th, 2021, 08:29 AM
OK - so mxcsr_mask is byte 28, which is byte 3 of the MXCSR register (lower 8 bits of the 4 byte MXCSR).
See...
-
January 6th, 2021, 06:45 AM
Originally, how is buf/fxbuf used in the code?
-
January 5th, 2021, 01:09 PM
The only last thing I can suggest is that you completely un-install ALL office products, make sure that are no folders called OFFICEnn or VBA, and then re-install complete Office.
PS You might try...
-
January 5th, 2021, 01:02 PM
Probably this one https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_fxsave which was suggested in my post #4.
-
January 5th, 2021, 10:42 AM
Have you got more than one mso.dll/excel.exe files located on your system? perhaps you're using the wrong files?
-
January 4th, 2021, 12:46 PM
mso.dll 17/11/2020 00:10 version 14.0.7263.5000
excel.exe 17/11/2020 0:04 version 14.0.7263.5000
-
January 4th, 2021, 08:30 AM
This is a complete program that compiles OK with MS VS2019 for Excel 2010 on Windows 7. This is the basis for all of my Excel automation code. Sorry, I can't try it with Windows 10 as I haven't got...
-
January 4th, 2021, 08:20 AM
For lru using unordered_map (hash) and list, consider:
#include <list>
#include <iostream>
#include <algorithm>
#include <unordered_map>
class LRU {
-
January 4th, 2021, 04:25 AM
This is what I use with VS2019 for Excel 2010:
#import "c:\\Program Files (x86)\\Common Files\\microsoft shared\\OFFICE14\\mso.dll" \
rename( "RGB", "MSORGB" ) \
rename(...
-
January 3rd, 2021, 08:27 AM
Basically for a LRU:
If the item exists, move to top
If the item does not exist, insert at top. If the size now exceeds max items, remove bottom.
This can be simply implemented using a list...
-
January 3rd, 2021, 06:28 AM
One simple implementation could be:
#include <vector>
#include <utility>
#include <iostream>
auto makesum(const std::vector<int>& nos, int sum)
{
|
Click Here to Expand Forum to Full Width
On-Demand Webinars (sponsored)
|