CodeGuru Forums » Visual C++ Programming
367 FOLLOWERS
CodeGuru is dedicated to helping developers and programmers by providing the most robust and up-to-date technical information and code snippets on the Internet! This category is a place to ask questions about Windows programming with Visual C++ and help others by answering their questions.
CodeGuru Forums » Visual C++ Programming
1w ago
Code:
int main() {
std::cout << std::format("{:< 8f}", .111111);
}
displays 0.111111 but I need .111111 (no initial 0).
Is this possible just using format or do I need to manipulate the produced string ..read more
CodeGuru Forums » Visual C++ Programming
3w ago
I'm interested in understanding the impact of Visual C++ on programming. Can anyone explain how using Visual C++ affects the development process? I'm particularly curious about its advantages, such as ease of use, debugging features, and any other benefits it offers ..read more
CodeGuru Forums » Visual C++ Programming
1M ago
Hello,
I am working my way into OpenMP.
The following code is supposed to compute pi.
It works fine for one thread, but in case of multiple threads the relative error gets larger. Can anyone spot the mistake? It should be trivial...
Code:
#include <iostream>
#include <omp.h>
#include <chrono>
int main(){
long int N = 1000000000;
long double dx = 1./N;
long double result = 0;
auto t1 = std:: chrono::high_resolution_clock::now();
omp_set_num_threads(2); // works only ..read more
CodeGuru Forums » Visual C++ Programming
1M ago
Hi all,
This is the code that I have. I got this code and I need to work with it:
Code:
#include <iostream>
#include "queueType.h"
int main()
{
queueType<int> qt(100);
for (int i = 0; i < 100; i++)
{
qt.addQueue(i);
}
return 0;
}
Code:
// queueTpe.h:
#pragma once
#include <iostream>
#include "queueADT.h"
template <class Type>
class queueType : public queueADT<Type>
{
public:
//const queueType<Type>& operator=(const ..read more
CodeGuru Forums » Visual C++ Programming
1M ago
Hi, ALL,
There is a EM_GETLINECOUNT, but it counts physical lines of the coyntrol, i.e. basically counts '\n\r' symbol.
Is there a way to count number of logical (wrapped) lines in the text control?
Thank you ..read more
CodeGuru Forums » Visual C++ Programming
2M ago
Hello,
I am new to coding and I need some help to figure out how to build this project so I can finally debug my crappy code:
https://github.com/lesderid/gdb-msvc
Currently I am using Red Panda C++ as my IDE.
I really like it because it's nice and tiny.
It's the only decent IDE I have found capable of running smoothly on my low-end hardware that barely manages to run Windows 10. (after stripping it down to the bone using NTlite)
I had to jump through a few hoops to make the IDE work with the MSVC compiler.
Now I have to jump through some more hoops to make GDB recognize MSVC's .pdb files ..read more
CodeGuru Forums » Visual C++ Programming
2M ago
[Note that this relates to c++/cli and not to standard c ..read more
CodeGuru Forums » Visual C++ Programming
2M ago
I have a CScrollView with a large image being shown and scrolled. When the user clicks, I respond to the L button down. how do I convert the mouse click coordinates to the corresponding point in the image, which could be scrolled some when the click occurs ..read more
CodeGuru Forums » Visual C++ Programming
2M ago
I'm trying to run a program that runs fine when built with gcc - and it builds okay with MSVC but crashes at run time.
I've traced the crash to a call to vsnprintf() which is getting passed a string like this:- "(Value: %s%s %+05.1lf dB) "
I've never seen %+05.1lf in a string before - is it a valid argument for MSVC ..read more
CodeGuru Forums » Visual C++ Programming
3M ago
I want to clear RichEdit control. But, I set the attribute of RichEdit control CFE_PROTECTED. So I couldn't clear RichEdit control. I think that I should set the attribute of RichEdit control again( release PROTECTED attribute).
How can I release PROTECTED attribute ..read more