Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Browsing all 3042 articles
Browse latest View live

Using template without an argument type

A program I'm working on seems to have a lot of functions like this in its header files:- Code: template <> inline std::string to_string (bool val) {         std::string tmp;...

View Article


Tryong to understand templates

I'm investigating a problem here when using boost::intrusive::list with templates but to get me started I wrote this small app (which works):- Code: #include <boost/intrusive/list.hpp> #include...

View Article


Control PDF from c ++

I wanted to put the PDF file on one page. When opening with "# page = 123" or "/ A page = 123" in the path or as a parameter in ShellExecute does not work. How could you do that when PDF is already...

View Article

VS2019 - Debugging without the exact code

In previous versions of VS I could press F5 to start a Debug session and if the code had changed slightly it'd give me the option to rebuild or not rebuild - but VS2019 always rebuilds without giving...

View Article

Some code I don't understand

I'm not sure if it's C++11 maybe but I just came across this line of code in a class declaration:- Code: explicit timepos_t (samplepos_t s) : int62_t (false, samples_to_superclock (s,...

View Article


Does a static class var work in a static lib ?

Consider the following code. Obviously the class is intended to get exported from a DLL - so there'll only ever be 1 x copy of some_var:- Code: class __declspec(dllexport) whatever  {   public:...

View Article

Is there a function intended to split strings by a delimiter in VC++?

Even if not part of the official C++ standard, does MS VC++ have any functions designed to split a C++ string (variable of type std::string) into an array of strings, where each entry of that array is...

View Article

#warning and MSVC

AFAICT it's not supported in MSVC but it seems to be much more common now for 3rd-party source code to contain #warning message lines. Is there any way they can be converted into something that'll work...

View Article


How to not display a UI?

Hi, ALL, MSDN at this link states that there is a flag Quote: CMIC_MASK_FLAG_NO_UI The system is prevented from displaying user interface elements (for example, error messages) while carrying out a...

View Article


Creating a popup window above an another.

I have a `handle` to third party window (not created by me, retrieved using the `FindWindow` function). Now I'd kile to create a small popup style window that will ALWAYS be laid down ovev/on top of...

View Article

TRACE MACRO problem in MFC

I'm able to see the data via watch list and cursor over var but unable to print the data via TRACE using specifiers %lf or any other specifiers the results keep showing 0.000000 I even set the var to a...

View Article

wait .. no blocking

need examples of a proper way to wait for a flag change in another thread without blocking the events?. In C++/windows.

View Article

IDC resource

I hope someone have experience with this problem and have a quick answer. I have a Microsoft Visual C++ 17 application that I am adding a new select button to an existing dialog resource. I am adding a...

View Article


MFC CRectTracker

Hi, I am trying to develop a MFC application that lets a user upload a photo and display it, and then the user will select a rectangular region of this photo and get its coordinates in pixel values. I...

View Article

Is it safe to locally use arrays, vectors and calloc when multi-threading

Hi everyone, I have a question about working with threads. Is it safe to work with locally assigned memory, such as arrays, vectors and memory temporarily created with calloc (or a simillar alloc...

View Article


Image may be NSFW.
Clik here to view.

Why is my single thread code is faster than my multhread code?

Just tried to implement multithreading rendering with vulkan and the result is dissappointing that multithreading code is 4x slower than singlethread. Tried multithreading on my cpu ray tracer code and...

View Article

Float point number simple arithmetic.

Having such a simple `c` program: Code: #include <stdio.h>     #include <float.h>         int main( void ) {                     float fl1 = 0.1;                                         //...

View Article


Sudden problem with std::vector

Code: uint32_t some_func() { return 32; } int buf_1[32];          // <--- this always compiled with MSVC int buf_2[some_func()]; // <--- whereas this fails because the buffer size needs to be...

View Article

I'm new in Golang

Hello. I want to start studying the Golang language but I can't find any IDE that I can configure well, can you tell me an IDE that is good for Go and how to configure it (explained for fools in...

View Article

Occcont.cpp error when migrating old VS2005 application to Visual Studio

I am updating an application originally built in 2007 with Visual Studio 2022. I've made a few minor changes to get the program to compile successfully, but when I run the program it generates an...

View Article
Browsing all 3042 articles
Browse latest View live