wstring Conversion
Hi, I was read a korean string and display the text. Code: std::wstring s2ws(const std::string& str) { int size_needed = MultiByteToWideChar(CP_UTF8, 0, &str[0], (int)str.size(), NULL, 0);...
View ArticleTime calculation in the main game loop.
There is the code in the Quake 2 main game loop implementation: Code: if (!initialized) { // let base retain 16 bits of effectively random data base = timeGetTime() &...
View Article[RESOLVED] wstring Conversion
Hi, I was read a korean string and display the text. Code: std::wstring s2ws(const std::string& str) { int size_needed = MultiByteToWideChar(CP_UTF8, 0, &str[0], (int)str.size(), NULL, 0);...
View ArticleWhy does this simple file read method does not work?
Code: std::string Program::readFile(const char* path) { //Variables. std::ifstream file; std::string content; //Set exception mask for file stream....
View Articlemfc dialog display problem
mfc dialog with picture control having display problem. content of 8 bit capture image buffer is shown somewhat tilted somewhat displayed incorrectly. Code: pbmi = (BITMAPINFO*) new...
View ArticleException in simple Azure example?
I'm trying Azure in C++ (VS 2019) and got the vcpkg packages (32 and 64 bit) as recommended here https://azure.github.io/azure-storage-cpp/ Then tried the examples here...
View ArticleIs Visual C++ the right language for a telecoms middle-ware project?
Hi all, I have a requirement for coder / programmer / software engineer to work on a project that involves middle-ware in a telecoms network (i.e. between end telecoms device and customer site...
View Article[RESOLVED] Exception in simple Azure example?
I'm trying Azure in C++ (VS 2019) and got the vcpkg packages (32 and 64 bit) as recommended here https://azure.github.io/azure-storage-cpp/ Then tried the examples here...
View Article[RESOLVED] Copy constructor does not get called when assigning reference to a...
Code: class Dispatcher { //Dispatcher callback. template<typename T> using DispatchCallback = std::function<void(T&)>; public:...
View ArticleCasting references VS Casting the mem address of that reference?
If you want to cast a reference you usually do this: Code: Subclass &myref = (Subclass&)base_class_object_ref; But I have also seen people doing this: Code: Subclass &myref =...
View Articletemplate deduction
Hello, I have following piece of template code, Code: void PredictionRaster::AutoSetSetIllegalValueIfRequired(PRED_DATA_TYPE pdt, AIBaseRaster *pRaster) { ASSERT(pRaster); if (!pRaster)...
View Article[RESOLVED] Filter a txt file based on an Excel data sheet
I would like to extend the functionality of the routine kindly developed by 2kaud - see: [RESOLVED] Filter a txt file based on a grid of data started by RIC63 user on 18 Feb 2020 - I need to add a...
View ArticleObtaining LogonDomain for logged on Windows Active Directory user
I am trying to obtain the name of the LogonDomain for the currently logged on user. I need this information to be able to determine if the user was logged in using a MicrosoftAccount, AzureAD or...
View ArticleDo header files with implementation work in a precompiled header?
Let's suppose we have this header file: People.h Code: class People { public: People(const std::string &name, int age) : m_name(name), m_age(age) { } inline const...
View ArticleWhere is the list for MRU projects in VS2019 ?
I have a weird problem here with one particular project in VS2019 (it's a Visual C++ project) Regardless of whether I try to open it from within VS2019 - or by double clicking from within Windows...
View Articlevcpkg Library Manager
Has anyone here heard of the vcpkg library management tool? It's intended for programmers and is apparently a similar concept to package management which is common in Linux. i.e. if you need to build...
View Articlesplit string function
Hi, I was trying to practice my coding , and found the following code for splitting string and finally use those to convert to integer and get sum of those numbers. I found the split string is written...
View Articlereading multiple lines into arrays
Hello, I am just starting to solve a problem, with multiple arrays, something like: 2,2 1,2,3,4 6,7,8,9,10 0,2 1,1 +++++ output: 3, 7 first line no of arrays and no of queries. 2nd and 3rd line, array...
View Articleoptionally enable the params
Hello , In the following class Code: class PixelCovCellInfo { ::::::::::::::::: private: unsigned int m_cellIndex; unsigned char m_carrierIndex; //...
View ArticleMSVC++ and Intrinsics sse2 appear not to work consistently
I am using: MC VC++ in Microsoft Visual Studio Community 2019 Version 16.7.3 on the latest version of MS Windows 10 using Parallels for Windows on a late 2015 Apple iMac which is uptodate. I am...
View Article