Multi-threading, Visual Studio, and Breakpoints
CodeGuru Forums
by alexsokolek
3d ago
Hi. I need some clarification and/or help with a multi-threaded application being debugged with Visual Studio. I notice that when I hit a breakpoint in a thread, it stops, and I can examine the status and values, but when I step to the next instruction, the debugger goes back to the original breakpoint. I think I understand that a different thread is hitting the breakpoint, and that when one thread is stopped, they all seem to stop, until I go forward. Is this understanding correct? Is there a way to hold the other threads, while I single step the first one? Also, is there anything in the de ..read more
Visit website
Question about acceptable use policy
CodeGuru Forums
by alexsokolek
5d ago
Hi. I'm a retired computer/electronics engineer with 45 years of experience supporting Windows, Unix, Oracle, MainFrame, and networks of hand-held computers. I write straight C/C++, mostly using the WinAPI, but I can do MFC. I dabble with Visual Studio writing Windows programs, and I would like to share them with my peers. I also would like to be able to get ideas for new programs. Q&A is also on the table, as I am willing to share my experience as well. Is this the right group to meet those objectives? Thanks ..read more
Visit website
Posting code - do I need tags?
CodeGuru Forums
by alexsokolek
5d ago
Hi. I am a new user to codeguru. When I post a thread and need to include code snippets, do I need to use tags, such as triple back ticks or [ code]...[ /code] blocks? Thank you ..read more
Visit website
How to run WndProc and pcap_loop callbacks
CodeGuru Forums
by notverybright
6d ago
After writing a console based app that uses Npcap libs to process packets, I've started on a Windows desktop app using VS 2022 C++ Win32 API which, at the moment, just displays packet source and destination IPs in a listbox. I have 2 buttons; Start and Stop which starts and stops the pcap_loop callback function. When I click the Start button, packets are displayed in the Listbox OK, but clicking the Stop button takes a few clicks and a few seconds to respond and when it does, an exception occurs - Access violation at the pcap_loop function call. I'm thinking this is because the pcap_loop is a ..read more
Visit website
Ant colony optimization workshop
CodeGuru Forums
by mike1981
1w ago
Hello. For anyone who is interested in ACO algorithms I created a workshop. It is a web application where you can : - set the source data as an image file (just draw the nodes of graph in your image editor) - set all coefficients this algorithm depends on - run calculations. - see result We are solving a travelling salesman problem Thanks ..read more
Visit website
What Are the Visual C++ Effects on Programming?
CodeGuru Forums
by levihenry
2w 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
Visit website
HR and Payroll System LIke ERP
CodeGuru Forums
by sillystar
2w ago
Hi Guys, I want to design and build an HR module that will include 1. Organization 2. Sites 3. Departments 4. Costcenters 5. Designations 6. Employee Profile etc. I need guidance and your expert opinion on which structure will be better 1. Create Organization table, Sites table and another table of Org_Site_map (which will be used in further application void) Or 2. Create Organization table and Sites table and add reference column of OrgID in sites table. Will appreciate your help in decision making ..read more
Visit website
C2882: 'ClassLibrary2' : illegal use of namespace identifier in expression
CodeGuru Forums
by mark107
3w ago
Hi all, I need your help.I am working on a class library project using c++ to create the function that I want to use to call the function from my windows application. When I try this: Code: ClassLibrary2a^ class1a = gcnew ClassLibrary2a; I am getting the errors: C2882: 'ClassLibrary2a' : illegal use of namespace identifier in expression C2065: 'class1a' : undeclared identifier C2061: syntax error : identifier 'ClassLibrary2a' I have added the ClassLibrary2a dll in the reference but it have make no different as I am still getting the same errors. Here is my form code: #pragma once ..read more
Visit website
How can I upload a tar.bz2 file to openstack object storage using Python swift client
CodeGuru Forums
by Hanginium2412
3w ago
I wrote a Python script that included the python-swiftclient module to connect to the OpenStack Object Storage and upload some files to the OpenStack Object Storage container It works great if I upload a file that ends with the extension .gz however, I?m getting an error regarding the ?TarFile? object having no attribute ?read? after running my script. when it comes to the compressed file that ends with the extension .tar.bz2. I?ve included the Python script and the errors I get after running it. Please show me where I?m wrong, and I would like some assistance in solving this issue. I?m a be ..read more
Visit website
OpenMP compute pi
CodeGuru Forums
by Nonplussed
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
Visit website

Follow CodeGuru Forums on FeedSpot

Continue with Google
Continue with Apple
OR