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

Read Access Violation on Function return
 
I have a simple little app that records weather data and does some calculations on it. The data is stored in Weather structures. The structures are stored in a ...
[14 replies] Last: I finally figured it out with all you guys help. All I had to do was c... (by riversr54)
Help with arithmetic project. (1,2)
 
Task 1 : display a table for y = -3x + 2 from – 5 to 5. Task 2: Display the square and cube of x = 1 to 20 The output has to be displayed in a table fo...
[20 replies] Last: Yes I ended up using the long format of code.. my professor told me af... (by mollywhoppinRBG)
My reverse polish notation calculator calculates the double but not interger?
 
Hey my program is all set up to calculate but for some reason when i type in the modulus (%)the result is 000 but the rest of the operations work? i could reall...
[2 replies] Last: ah, a coder after my own heart. When I saw the winx calc mess I wrote... (by jonnin)
by eladb
csv file to chart
 
Hello friend's, I would like for some help. I'm looking for a way to present some CSV sheet as a graph. i have open the file, and read the sata shouls be ...
[2 replies] Last: If your data is the first two columns of a CSV file, then, as @keskive... (by lastchance)
Function-Calculating BMI by using Function
 
int main(){ int a=0,b=0; float c=0; cin >> a; cin >> b; BMI(&a,&b,&c); cout << c; return 0; } void BMI(=,,=) { // Plea...
[2 replies] Last: void BMI(=,,=) { // Please fill this blank??? return ???; } Filling... (by doug4)
by zongul
Threads, mutex and multiple functions
 
I have two functions, lets call func1 and func2, two threads start_t1 and start_t2 and one mutex. I want that the two functions run parallel and my question ...
[1 reply] : You need a mutex for most of the shared resource. This resource is usu... (by coder777)
by josuex
I need to do a program that meets infinite limits please
 
please help me I need a c ++ program that solves problems about infinite limits with their respective graph. If you would help me, I would be very grateful for...
[3 replies] Last: [quote=josuex]as you can see No, @josuex, we can't see anything. Beca... (by lastchance)
by ravss2
virtual functions overriding
 
Hi, Below is my code, i was expecting an error from program because when i print the base pointer before and after assigning derived pointer it is different. ...
[4 replies] Last: The Liskov Substitutability Principle says that an instance of a der... (by mbozzi)
Function in separate .cpp file not working
 
So I have two separate files in a repository on VS. One of them has a function, and the other one calls the function. However, when I run the code, it gives me ...
[7 replies] Last: One definition rule: ODR One definition only is allowed may have many... (by marhuum)
Two functions with one name one in this one in its friend
 
Which of two functions of one name will be called, the one declared in a class of the object invoking it or one in a class within which a friend to the first cl...
[1 reply] : Why not try it out yourself? // Example program #include <iostream> ... (by Ganado)
by obeeey
How to save an address?
 
Hello, let's say I've got something like this: int main() { numberData* myData = NULL; readNumbers(&myData); //lots of other things... show...
[4 replies] Last: Thanks for answers. From all of those I choosed to implement recursi... (by obeeey)
help with jpg compression
 
I am trying to learn how to do jpg compression. Currently I am taking in a ppm image, doing a DCT on the image, then doing quantization, then doing reverse quan...
[10 replies] Last: Ok clamping the output worked, and it is now fixed here is the code h... (by bomzytrewq)
by obeeey
String operator overload problem
 
Hi, I've got a task to write a prototype of string class, but I'm stuck with the '>>' operator. This is how it looks now: std::istream& operator>>(std::istr...
[10 replies] Last: Hey, I forgot to answer earlier, but somehow I managed to make everyth... (by obeeey)
HW Help
 
My program is to print out the student inputted Name, Age,Mailing Address using classes, struct and h files. I'm getting an undeclared identifier for my privat...
[1 reply] : void Student::setName(string name) {name = name;} You need to assig... (by kbw)
Matrices and Templates
 
Good evening! I have some troubles with C++, but I need to complete the task. ______________________________________________________________________________...
[1 reply] : You need to write Matrix as a template so that it can take doubles or ... (by dutch)
std::filesystem::copy giving strange errors
 
Hi all, I am currently developing a small application using Visual Studio, where I use the std::filesystem::copy function in order to copy a bunch of files f...
[4 replies] Last: @jonnin: I do not see an option in std::filesystem::copy to open a fil... (by bcuypers)
why i get error 2d array
 
why i get error error: cannot convert '<brace-enclosed initializer list>' to 'int' in assignment my code: struct seat{ string name; int x=16; ...
[2 replies] Last: thanks , did not notice (by kryganas)
Program freezing up, not accepting inputs.
 
#include<iostream> #include<conio.h> #include <chrono> #include <ctime> using namespace std; typedef std::chrono::high_resolution_clock Clock; /*stru...
[5 replies] Last: int main(){ while(true){ userCar.update(); //manage in... (by ne555)
Help opening a file usig data structure
 
Write your question here. Doing a project but i dont know how to even start. Here are the instruction This program shall: • open the DB file: TestDB.dat ...
[6 replies] Last: > You have been asked multiple times to use code tags I see just one: ... (by ne555)
Am I using files correctly?
 
So I have two files. One .cpp and one .h file. The A.h file contains a class that has attributes and methods in it. The B.cpp has #include "A.h" in it, it...
[3 replies] Last: it'll be easier to answer if you just post the files (by ne555)
March 2020 Pages: 1... 4567
  Archived months: [feb2020] [apr2020]

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