C++ IDE Query
Hello Everyone, nowadays I am learning Cpp. and I am confused between C++ ideas like Code Blocks, Dev C++, Visual Studio Code.I Have Searched this on the Internet and found many of the sites listed...
View ArticleTransferring items from an unsorted set to a sorted set
This code builds fine with gcc and it used to build fine with VC2008 but it causes a compiler error with VS2019. The original code used more complicated object types so the comparisons look quite...
View ArticleA 'customised' std::list ??
I'm building some code which uses a library called lua. One of its header files contains a template class which (I think) is some kind of customised std::list - i.e. it's a cutdown version which only...
View Article[RESOLVED] using a dll without the .lib file
I have a dll that I want to use in Visual C++ but I don't have the library file for it (.lib). When I try to compile I get "Error 2 error LNK1120: 1 unresolved externals" Is there any way to use...
View ArticlebitBlt & scrolling issue
Hi, Here is my code; Code: void RenderPage(CDC* pDC) { COLORREF clrBackground = RGB(120, 120, 120); CRect rcClient; CSize m_size; CPoint m_pt;...
View ArticleBasic questions about VC runtimes and compatibility
I have read now for a while about VC runtimes but did not found a satisfying answer for the following questions: 1.) If I run a 32bit program (which needs a VC runtime) on a 64bit WinOS (Win7 or...
View ArticleError: No Operator
Code: #include "Inventory.h" #include "Car.h" #include "CarSpec.h" #include <cmath> #include <iostream> #include <string> #include <iomanip> using namespace std; // output...
View ArticleMSDN: Documentation issue
Hi, ALL, Could someone lease explain why some pages in MS documentation do not match when they should? 1. Page 1 at https://docs.microsoft.com/en-us/sql...l-server-ver15 2. Page 2 at...
View ArticleCatching OS exceptions
Is there a way to catch exceptions that get generated by the OS? For example... Code: try { fread(NULL, 2, 3, NULL); // This produces an Access Violation error } catch (...) { int x =...
View ArticleWeirdness with ODBC API
Hi, guys, Code: for( int count = 0; count < i; count++ ) { ret = SQLColAttribute(...
View Articlestd::vector::emplace_back vs std::vector::push_back
Well i just figured out there's a emplace_back method than does same thing as push_back after 4 years messing around with c++. Which one is faster or which one should I use. Currently i use...
View ArticleUsing a thread pool in real situations
I need to improve an existing code by using a thread pool. Let say I have the following code, which get data from a SQL DB: Code: bool CMyClass::GetSQLSelect(std::string sql, void* data) { .......
View Article__cplusplus number
I'm involved in a project written for gcc (although I build with VS2019). Recently, someone added a section like this:- Code: # if (defined(__cplusplus) && __cplusplus >= 201709L) //...
View ArticleScrolling issue MFC
Referencing my question @ https://stackoverflow.com/questions/...crolling-issue Here is the video demonstrating the issue I am having: https://m.youtube.com/watch?v=6RHYADs-TSg In the original...
View ArticleSomething analagous to exp2f()
I'm building a program with VS2019 but the main devs like it to be buildable with a wide range of compilers so I periodically check the build with VS2008. Recently, someone's added a call to exp2f()...
View ArticleCircular include problem
I have entered into a circular include problem. I have a class: Code: #include "TestConnection.h" #include "oci.h" #include "SU_ORADB_imp.h" class DBTestConnection final : public Connection { private:...
View ArticleDesigning a game loop.
I'm developing a simple Win game. Here is my 2 similar implementations of the game loop (in c++): approach #1: Code: while (Msg.message != WM_QUIT) { if...
View ArticleMFC chart plot
Hello, I have to add a simple chart in VC++ project (x and y ). As we already have MFC, is there any way to do it in c++ Or MFC, without any external tools ? thanks a lot pdk
View ArticleCalling python from c++ in visual studio
Hello, I used the visual studio installer to install python. I could run the basic python program. Now i want to make a c++ console program and call the python script from there. When googling i saw i...
View ArticleChanging the coordinates where I want to draw my bitmaps onto?
First, I don't want to use Blit or StretchBlit, I will use another function to draw that bitmap to that area. So I need to change the coordinates. I did some research on the web and I found a function...
View Article