Beginners - February 2020 (Page 10)

Convert Function to Work With Class
 
I had a function that I created and it works on its own with main. Now, I am in the process of trying to convert the function so that it works with a given clas...
[12 replies] Last: I haven't been taught anything about #includes or #defines that I shou... (by stoneJax)
weapons implementation games c++
 
----------------------------------------------" << endl; } }
[no replies]
Please help
 
Cout<<“circumference=“<<2*PI*radius<<endl; Comes out as error C2146 Please help
[5 replies] Last: You may get this if you use Cout: 'Cout' is not declared in this sco... (by MILLER XYL)
Getting warning "buffer overrun"
 
Hello, I have two questions: 1)the program below executes OK but getting one warning: "buffer overrun while writing to 'result': the writable size is (size_s1...
[19 replies] Last: Same page, same ocean - what metaphorical genius. Which compiler optim... (by againtry)
Adding Big Integers string char conversion
 
Write your question here. Stuck working on an assignment for adding big integers Here are the instructions for the assignment Adding BIG Integers In ...
[4 replies] Last: #include <iostream> using namespace std; string add(string small, s... (by kittkitt1)
First Pointer Program
 
Firstly, I was trying to make this program using arrays and then I would attempt to change it into pointers with dynamically allocated memory. Which I will be n...
[6 replies] Last: I have updated the program with pointers. I'm stuck with the reverse f... (by CodeNovice01)
by AlanB
Initialization with Curly Brackets
 
I saw this line of code in a program and although it looks simple I don't understand the reason behind initializing with curly brackets. //Default Constru...
[1 reply] : In this case it signifies a parameter with a default value of an empty... (by jlb)
SOS: Moving data to a big void print function
 
"You'll need to print out the yearly profits in generateReport() along with everything else (that's the only way to get it to appear all together) - so make sur...
[3 replies] Last: Hello aardalde, I managed to move everything around and figure out th... (by Handy Andy)
by nickg
nested if - then
 
I'm trying to program the following: create a starting cohort of 1000 age-1 individuals of random lengths simulated from a uniform random on [650, 750]. Then, 1...
[4 replies] Last: I created a version of your code that just prints a table of the key v... (by dhayden)
Recursive Functions (1,2,3)
 
Hello, Can someone help me and walk me through the steps with this assignment. I'm a pure beginner and this is beyond my knowledge level. I didn't post any c...
[50 replies] Last: This is a college course. There is no “starting the course” over.... (by jlb)
by cgill2
help with formula << output 0 ??
 
Hey guys! Very new to C++. Just started taking it this semester. For some reason my output keeps coming out as [0.000] and I cannot figure out why. Can someon...
[4 replies] Last: #include <iostream> #include <iomanip> #include <cmath> using namesp... (by againtry)
How to remove zeros from an array
 
I am new and I would be much obliged if someone gives a hand. I have an array looks like this : {1,0,0,2,0,3,0,0,4}; I want to take all the zeros out s...
[11 replies] Last: To Ganado, It works fine. Thanks a lot. I, promise, will find an al... (by allenmaki)
by darego
Binary search tree printing out incorrect height
 
I am trying to create a simple Binary Search Tree, then add several integers to the tree and finally print out the height of the tree. If I add integers of 10, ...
[9 replies] Last: makes sense! I could really not figure out why the height was incremen... (by darego)
Need help
 
how do I get my code to work and figure out the outputs, I am trying to get the volume and surface area for a Sphere, cylinder and cone. using namespace std; #...
[3 replies] Last: Read my post, please, uguerro, especially the points about doing thing... (by lastchance)
Invalid use of incomplete type?
 
Here is a simplified version of the problem i'm facing in my code: namespace { template <class T, class... Types> inline constexpr bool is_any_of...
[6 replies] Last: [quote=Ganado]To be honest I'm not sure of the formal rules here, but ... (by TheToaster)
Double xor
 
I don’t understand xor completely, let’s say, so if I have 2 key strings x and y x: "blah" y: "voop" and a plaintext string p p: "food" And say I xor p...
[7 replies] Last: Thanks. :) (by highwayman)
SOS: Void Function
 
How do I get the void function calculateYearlyProfits at the bottom to properly add up the yearly profit for each ride? Thank you. #include <iostream> #i...
[3 replies] Last: Hello aardalde, To start with your code is very very hard to read. A ... (by Handy Andy)
How to use memset ?
 
I'm using memset in my program but it seems weird, so I make a program to test it and the output wasn't as same as I expected. This is my code: #include <io...
[4 replies] Last: JSYK, not all C/C++ systems use IEEE formatted values for floats and d... (by Duthomhas)
ConvexHull monotone chain on wikipedia
 
https://ideone.com/wnfIov I found Jarvis march and rewrote it using doubly linked list above How can write algorithm https://en.wikibooks.org/wiki/Algor...
[no replies]
by AL88
Nested if else and for loops problem in game engine
 
Hi I am trying to build the game engine from the book SDL Game Development by Shaun Mitchell, the book is very hard to follow and frequently gives examples of ...
[2 replies] Last: Hi I dont think the book wants me to take out any of the for loops, bu... (by AL88)
February 2020 Pages: 1... 8910111213
  Archived months: [jan2020] [mar2020]

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