General C++ Programming - September 2021 (Page 2)

by Qsh222
A problem involving divisors
There are two numbers written on a board, A and B. If A and B are divisible by P, where P is a certain prime number, we can replace A and B with respectively A/...
[5 replies] Last: For 70 and 84, - divide each by 7 gives 10 and 12 - divide the first b... (by lastchance)
How does one get the width of an general int (1,2)
My goal is to set only the high bit of a general int. I would like to use it as a constant for speed considerations. I can calculate the high bit and it is de...
[23 replies] Last: Implementing a Fourier transform? (by mbozzi)
PLEASE HELP A COMP SCI MAJOR STUDENT OUT!!!!! (this is due in about 13 hours) I need to Approximate the area of a quarter circle by using 10,000 rectangles. I ...
[10 replies] Last: thank you everyone for your help, please forgive my obvious errors I a... (by vvartani)
How to reset ethernet settings?
Hi everyone. I want to write a code for reset the ethernet settings. Is it possible to do such a thing? If I can do it, this exe will run on windows os. Tha...
[4 replies] Last: What is "ethernet settings" anyway? In firmware of card, in UEFI nvram... (by keskiverto)
by azenda
An array of pointers to arrays of derived objects?
Hello, I have a base interface and a few classes derived from it, holding similar but different data. I need a few arrays of same derived classes and would l...
[9 replies] Last: I'm not sure (not tested) if I can simply use derived classes in a st... (by MikeyBoy)
Screen capture performance with directx
I am trying to make a fast screen capture with direct x, but the performance is horrible.. This function GetFrontBufferData is some horrible crap.. It takes aro...
[no replies]
by volang
Does all std functions throw exceptions?
Does all standard functions throw exceptions? Or only the ones that have specs where it's mentioned ?
[7 replies] Last: right, a thing to consider is many library functions work with user-de... (by Cubbi)
Linked List Delete won't work
I was task to create a linked list and it must be menu driven I already finish the other parts but the delete a record won't work and it just delete the first n...
[6 replies] Last: In case anyone in the same class is following along... Notice that ch... (by dhayden)
Need Library for digital to analog conversion: any help?
I need to find a library for robotics that lets me change audio from a file, digital, to analog output. 3 pins the cable is. im newer to C++, but I can work out...
[5 replies] Last: will openal work on this thing? I am pretty sure it will do what you... (by jonnin)
operator overload from setfill? weird error from code
Hey yall, I was working on my code for class and I ran into this error with this chunk of code. I can't seem to work out exactly what the problem is, but I do k...
[2 replies] Last: That worked! I took a bit of editing since the characters started disp... (by dorito200)
MATLAB vs C++ Outputs not matching
I have the following function of sum of sines and cosines in both C++ and MATLAB and I am using this function for testing purposes. However, for some reason the...
[10 replies] Last: Hey everyone! It seems the issue was a huge "round off" error. I didn... (by JamieAl)
Help with Socket Programming code
Here is the code in question in C not C++: // Example socket client #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include ...
[2 replies] Last: It seems you're learning it backwards. Ideally you'd learn a bit abou... (by kbw)
Problem with static queue c ++
Hello this is code, but not show list help me please #include <iostream> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h>...
[3 replies] Last: Line 16: You're assigning a pointer to itself. That does nothing. R... (by AbstractionAnon)
Infinite loop when a letter is an Input, any fix?
Hi, I got this problem where the program just infinitely loops when a letter is an input instead of a number. it happens in line 36-76 and same as the next one....
[3 replies] Last: Anywhere your stream may fail, you should have: if ( ... (by zapshe)
Help with Event Simulation Program
GitHub URL: File: lab1.cpp can be found in .github folder --------------- I'm having issues when going through...
[1 reply] : If you debug and go line by line in the while loop you get an idea of ... (by linklance)
replacing function name
Hi all - This question is equally applicable to C and C++, I believe. I'm working on porting an application. I'd like to replace some function names witho...
[6 replies] Last: yea that was the 'wrapper' idea :) but you are totally correct. (by jonnin)
Help with Process Synchronization (C not C++)
Please help me solve parts a, b, and c, it is confusing me and taking me forever because I don't know what to do. Code in question: // A simple readers/writ...
[2 replies] Last: > Please help me solve parts a, b, and c, ┬┐did you solve part zero? ... (by ne555)
division for a counter??? help please!
Hey yall, this is part of a big assignment I have coming up and this part has put my progress at a dead stop. The question itself is: "Create an integer var9...
[2 replies] Last: #include <iostream> int main() { // Create an integer var9 and ... (by The Grey Wolf)
by Armanc
How to not change original array values when using recursive function in C++?
I am using a function to change the array's elements. Basically, it merges two elements and puts them to the first element of the array and returns it. After th...
[3 replies] Last: Aarrgh! That's the worst way to solve it! What that does is create a ... (by Duthomhas)
Need help starting/doing this lab
I need help with this problem, its supposed to read from an input.txt file, do what it says in the requirements section, and produce an output.txt file with the...
[7 replies] Last: I really don't know how to do any of those things It sounds to me l... (by dhayden)
September 2021 Pages: 1234... 6
  Archived months: [aug2021] [oct2021]

This is an archived page. To post a new message, go to the current page.