General C++ Programming - March 2021 (Page 6)

Letter Frequency
 
This program will analyze a text file given by the user and report the frequency of letters within the file. The program is not case-sensitive, so all alphabet...
[7 replies] Last: Consider: #include <iostream> #include <fstream> #include <cctype> ... (by seeplus)
Run-Time Check Failure #3 - The variable 'temp2' is being used without being initialized. (1,2)
 
This is a second code I'm trying to run, My first code bricked, so I redid it and I'm still getting errors at temp 2 on line 48. // 2/26/2021 #include<ios...
[25 replies] Last: That makes sense. Thanks! (by JRManx)
Input Verification
 
Hey there, I'm creating a menu that will allow a user to enter and display billing information they input into arrays. I'm attempting to create a function which...
[2 replies] Last: Much appreciated, that works smoothly (by coff33Cup)
Sorry but I don't get why/when to use auto or decltype(auto) for return types
 
Hi, I am confused with when and why to use auto or decltype(auto) on the return types of functions. I thought auto by itself always made a copy of the stuff...
[5 replies] Last: What you are wondering about is C++17's structured binding . https://... (by deleted account xyzzy)
How do I turn this into an array?
 
#include <iostream> using namespace std; int main() { double monthOne, monthTwo, monthThree, monthFour, monthFive, monthSix, monthSeven, monthEight, m...
[4 replies] Last: #include <iostream> int main() { const unsigned NUM_MONTHS {12}; ... (by seeplus)
Finding of time for function
 
I need to know time of function foo() I cant find an avarage time of working for function (statistics.cpp) experiment.cpp #include <ratio> #include <chrono> ...
[9 replies] Last: As some others have pointed out, you are not storing the results of t... (by onetwo123)
by MA2121
Need Assistance fixing this program
 
Design a class called Heading that has data members to hold the company name and the report name. A two-parameter default constructor should allow these to be ...
[1 reply] : Hello MA2121, While I try to read your program. PLEASE ALWAYS USE ... (by Handy Andy)
Sanddollar using C++ for scripting
 
Greetings good people! My first post on this board. I hope everyone is coping well with the pandemic I have been playing around with the idea of trying to us...
[no replies]
ESP8266 data upload to web server with FTP
 
I am working on a microcontrolelr project where I am trying to send data to web server using NodeMCU via FTP. I have achieved that successfully, now my quest...
[1 reply] : 1) I am uploading data via FTP in txt file, which is saved in hosting ... (by salem c)
by dm0000
midka228
 
Given two integers a and b – sides of triangle. You need to write a function that calculates the hypotenuse of the triangle.
[2 replies] Last: sqrt() is in <cmath> and if its not a right triangle, sin, cos, etc a... (by jonnin)
Write a C++ program that manage the student’s grades. Starting with a fixed number of students (10)
 
I would need some help writing this code, I have one made but having trouble getting it to work, any help is appreciated. Basically the number of grades is give...
[2 replies] Last: As the number of grades per student is determined at run-time and not ... (by seeplus)
Pointers and casting interpretation/reading logic
 
Hi, I don't have access to the function definition of this: I2C_Write(2, TCA9535_ADDRESS, TCA9535_CONFIG_REG0, (unsigned char*)&Regs->Config, 0); And don...
[2 replies] Last: Part of understanding it is just experience with the idea behind what ... (by jonnin)
problem error: invalid convertion
 
#include <iostream> using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ void conceito (...
[1 reply] : First, you can use code tags when posting here. They help reading and ... (by keskiverto)
Is returning a local native array by reference an error?
 
I have this code: auto getArr() -> int(&) { int arr = {3,9}; return arr; } the array arr should be destroyed at the exit from getArr() so th...
[1 reply] : yes, this is an error. Its not a syntax error, but it is still undefi... (by jonnin)
two processes communicating with each other
 
Hi, I got this assignment and I am trying to find out how should I proceed in order to solve it : two processes on the same computer or other computers must ...
[1 reply] : What's to figure out? > We assume that by contract, OS offers us.... ... (by salem c)
Loop with objects
 
Hi I really need some help here. I need af more dynamic way to apply changes to objects I use in a form Say I have a form with 20 Switches (Form->Switc...
[7 replies] Last: It has been several years since I used C++Builder, it was version 6, I... (by deleted account xyzzy)
20 Guesses
 
For this assignment, write a program that will guess a secret number within 20 guesses or less. The user will choose a secret number between 0-1,000,000 and th...
[18 replies] Last: Thanks! (by JRManx)
Working with years in data struct
 
Hi. I have a problem to solve this condition : In a struct data are known the registration number of the person(consisting of 5 digits), the year, the day, and...
[4 replies] Last: doug4 thanks (by blaster123)
reading strings with ifstream
 
When reading strings from a file, what should the strings be initialized to if you want to find the greatest string value and the least-greatest string value. I...
[3 replies] Last: Thank you. Thank you. (by timestime)
by frek
Smart pointers proper usage in my project
 
I'm doing an exercise of Bjarne's book PPP (chapter 21): 6. In the Fruit example in §21.6.5, we copy Fruits into the set. What if we didn’t want to copy th...
[13 replies] Last: @frek, @coder777 make_shared has an interesting purpose. Without it,... (by Niccolo)
March 2021 Pages: 1... 4567
  Archived months: [feb2021] [apr2021]

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