General C++ Programming - March 2022 (Page 5)

registration using do-while activity
 
Write a program that can register a user with name, address, age, course and gender. Then the system...
[12 replies] Last: Do you mean for L29: g += '\n'; (by seeplus)
by frek
Missing element (1,2)
 
Here's the exercise: An array A consisting of N different integers is given. The array contains in...
[22 replies] Last: Array or vector doesn't matter. By calculating the difference on each ... (by againtry)
Largest sum issue (1,2)
 
Here the method findSumMax must return largest sum of any two elements in given vector of positive n...
[20 replies] Last: [quote=mbozzi]nth_element might be better than partial_sort Yes, you... (by lastchance)
vector versus pointer access
 
For the following code: for (int i = 0; i < 4000; i++) { for (int j = 0; j < 5000; j++) { tab...
[12 replies] Last: Please explain some about the bigger picture. You can't effectively r... (by mbozzi)
Part2 - Math: how calculate the line dots?
 
these topic is the second part of https://www.cplusplus.com/forum/general/281522/ heres the final c...
[7 replies] Last: the black fill is the Window Console Backcolor. (by Cambalinho)
Trouble reading CSV file
 
Hello!.. I have .csv file that I'm reading from that looks something like this, for example: 0,0,0...
[11 replies] Last: Works perfectly now. Thank you all for the help, really appreciate it. (by brianbathorycpp)
by Cplusc
argc and argv with mpi and command line argument
 
I'm working on a code which takes 3 arguments as command line. I applied the MPI on the same code an...
[4 replies] Last: Your example is NOT using commandline arguments. You are re-directing... (by lastchance)
how to find the median in c++
 
from smallest to largest this is what I have if(grades < grades && grades < grades && grades <...
[2 replies] Last: [quote=salem c]C++ has many toys to play with. Also, std::partial_sor... (by lastchance)
by medvih
Atomic load in destructor
 
Hello there, This is my first post in this forum and I have been trying to understand on my own wha...
[1 reply] : Thanks for sharing informative information https://www.upsers.page/ (by Smith441)
Trouble shooting slow computer. Please Help!!
 
I'm running the same code on 3 machines, but it lags on 2 machines. How would I trouble shoot this p...
[8 replies] Last: Trouble shooting slow computer. Please Help!! So far so good because... (by againtry)
by demhat
scanf error!
 
#include <stdio.h> #include <stdlib.h> #include <time.h> int guess(void); int main(){ srand(t...
[4 replies] Last: scanf(" %c",&again); this work the program correctly THANKS! (by demhat)
by demhat
program execution wrong!!
 
#include <stdio.h> #include <stdlib.h> int perfect (int number); int main(){ int num; f...
[6 replies] Last: I changed code with #include <stdio.h> #include <stdlib.h> int perf... (by demhat)
rectangle overlay
 
I am trying to solve this problem, than given 2 rectangles as below: +===============+ (x2,y2) |...
[6 replies] Last: Thanks a lot, lastchance, for your valuable inputs here :-) (by leo2008)
Subtraction underflow???
 
Hello all, I am writing a class called bigInts that deals with bigInts (dynamic arrays of shorts...
[5 replies] Last: Big integer Addition and Subtraction are easy, Multiplication is not t... (by againtry)
i'm trying update a DrawLine3D(), but how use max()?
 
from http://members.chello.at/easyfilter/bresenham.html i'm trying draw a 3D Line: void plotLine3...
[12 replies] Last: using these function: vector<point> GetLinePoints(point Origin, point... (by Cambalinho)
blank
 
blank
[13 replies] Last: If you were a true beginning C++ coder, someone who had never done any... (by deleted account xyzzy)
JsonCpp parse issue
 
I have created a .json file, and need to read it and append some new information to it. This is in ...
[7 replies] Last: Stilll no self-contained compileable example, as was previously and po... (by deleted account xyzzy)
I am trying to overload << operator to seinding the command
 
Hi I have a bachelor project about DJI Tello Drone and I wanted to overload this "<<" operator so th...
[5 replies] Last: Not sure what you are aiming for. To be able to write: drone << comm... (by JLBorges)
If Statements With Multiple conditions
 
char grade = 'F' ; if( avg_grade >= 89.5 ) grade = 'A' ; // >= 89.5 A else if( avg_grade >= 79.5 )...
[1 reply] : This is not the first time this problem has cropped up. The usual reas... (by againtry)
by frek
Find algorithm task (1,2)
 
The exercise says: https://imgur.com/a/Zm7Q8hx And here's my first solution: #include <iostream> ...
[24 replies] Last: LOL, nice. I had forgotten about the specialist integer bit-twiddling ... (by Duthomhas)
March 2022 Pages: 1... 34567
  Archived months: [feb2022] [apr2022]

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