Beginners - October 2021 (Page 5)

by garyL
Average from array keeps returning address?
 
for my hw assignment, i had to write a program with 2 functions and an array to gather grades and then calculate the average of the grades. I am currently stuck...
[5 replies] Last: wow, yup that did it right there! been driving me nuts trying to figur... (by garyL)
how to skip over code
 
Hi guys! I'm having trouble with a part of my code. I don't want it to output the given pollutant emission and if it is within allowable levels, I just want it ...
[1 reply] : Do you mean something like: #include <iostream> #include <string> ... (by seeplus)
My while loop won't do anything after I input the word yes
 
My while loop won't do anything after I input the word yes. I have marked the line that is giving me problems. Please help! #include <iostream> #includ...
[9 replies] Last: Thank you guys for the comments, they were very helpful! (by BeginnerCoder123)
by Naqq
Building a Recipe
 
For the love of humanity, someone please look at this. This is the shell I have so far. I am trying to build a recipe, but I think I have already started off wr...
[3 replies] Last: enum names are mostly used to make your code prettier, similar to cons... (by jonnin)
Help with int variables
 
So I'm making a program that takes a price a trade-in value and a down payment with an interest rate to find a loan amount and then break that loan amount into ...
[2 replies] Last: @OP You have many problems with your code. This gets you on the right ... (by againtry)
by jet951
Get values to match for certain output
 
Hi guys I'm having trouble getting the output from my calculate function, I'm trying to get the middle row (val4, val5, val6) to always output three in a row. H...
[1 reply] : PLEASE ALWAYS USE CODE TAGS (the <> formatting button) when posting co... (by TheIdeasMan)
Changing the using to class inheritance
 
Can anyone teach and guide me how to change the "using" to a class inheritance format class Movie { public: string name, day, time1, time...
[8 replies] Last: I did not download your code, but I did take a glance at it. One thi... (by AbstractionAnon)
How to have multiple input and multiple output
 
Hi, we were given the task to create a program where the user has to input 10 grades and the output is supposed to give the corresponding grading letter. I have...
[6 replies] Last: Thank you so much about this :D (by noir234)
How to check the data type of a variable at compile time?
 
I want to use `constexpr` to check data types at compile time. The code is the following: namespace toml { toml_table_t* parse(auto data) { if constexpr...
[2 replies] Last: You could also use simple function overloading to make this choice. ... (by closed account EUoNwbRD)
by sarvcr
Access violation reading location Error when deleting the positions of a vector
 
Hi! I'm writting a code with several classes. One of them is supposed to contain a vector or objects from another class. I've done this kind of things several t...
[9 replies] Last: While it is not illegal to release a null pointer, it's considered poo... (by AbstractionAnon)
void* func(void* arg)
 
does this function mean that the data type we will pass is unknow and the return will be pointer? how this func work void* func(void* arg)
[3 replies] Last: void * is more C than C++. I can't think of a lot of places where yo... (by jonnin)
CRUD
 
Can someone help me to delete the float values in my code? error : type 'flooat' argument given to 'delete', expected pointer #include <iostream> #include <st...
[8 replies] Last: :) Not the full story but ... By concentrating code on individual pr... (by againtry)
nothing being outputted to the output file? (ifstream and ofstream)
 
I am new to programming and these type of forums so please forgive me if the question asked sounds weird but I am getting the two files that are needed which ar...
[8 replies] Last: L24/25 is usually written as : while (fin >> x1 >> y1 >> z1 >> x2 >... (by seeplus)
Memory limit exceeded
 
Please help as I don't understand why I am exceeding the memory limit when I add a new item to the array, is it exceeded due to something else? this is an ex...
[4 replies] Last: https://docs.microsoft.com/en-us/windows/win32/procthread/thread-stack... (by salem c)
How do I delete a certain record?
 
How do I add a delete code so it deletes a record? Here is my entire code. #include "medPing.h" #include <cassert> #include <chrono> #include <thread>...
[13 replies] Last: It would be much better if vitalHistory was a std::vector and not a c-... (by seeplus)
linked list problem
 
Hi guys, so here is my task : Write a program that creates a simple linked list of N integers taken from the INPUT file. The last number entered is one. Thes...
[2 replies] Last: In C++, there's no need to specifiy struct before referring to the nam... (by seeplus)
Display wether input is odd or even
 
Basically my program is to allow the user to enter as many integers as wanted, positive or negative, and then after each input display if the number is odd or e...
[2 replies] Last: @OP Here's a clunky start that might be of use. #include <iostream> ... (by againtry)
accessing const array
 
Hi all - I have this defined in a source file: const char *TASK_TAGS = { "Flash", "HttpServer", "I2dApp", "Iob", "Wifi", }; ...
[3 replies] Last: Header: #include <cstddef> extern const char* const TASK_TAGS ; ext... (by JLBorges)
Adding 2 IEEE 754 numbers please help
 
I am trying to learn about IEEE 754 operations, starting with addition. I want to make a code for them but am trying to understand the logic behind them first. ...
[1 reply] : you subtract 127 from the exponent if this is 32 bit. and adding up m... (by jonnin)
by Milnk
Using function
 
Question: I honestly have no idea how to answer test #1, it only needs one input and will output one when the question is asking the user will input ten (10) co...
[7 replies] Last: Just leave your posts unedited, others can then see if they have same/... (by deleted account xyzzy)
October 2021 Pages: 1... 34567
  Archived months: [sep2021] [nov2021]

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