Beginners - December 2017 (Page 15)

by Hanske
A reference to a function
 
Hello, What does the second argument of this function actually do? I couldn't find anything on the web regarding it. int main () { int f(int* ...
[6 replies] Last: Ah right. Thanks for the help again. :D (by Hanske)
for loop not working properly (1,2)
 
Write your question here. the program is about two heroes fighting against each other and *operator displays the name of the winner and displays the number of ...
[20 replies] Last: thanks for helping! Took me a while to think that there were gonna be ... (by lithony)
I/O, output problem
 
Hello All. I am having trouble with producing a report file containing results from a read file. The entire code is posted on the link below. https://git...
[3 replies] Last: Not a complete analysis, but a quick read through the code shows a lot... (by Chervil)
creating and writing to a file
 
How do I create and write to the file that i will call "p6.dat"? #include <iostream> #include <fstream> #include <string> using namespace std; in...
[8 replies] Last: @jpengineer You should ask for the scores, and fill them, BEFORE you ... (by whitenite1)
by Mallet
Two Inputs & An Output
 
Hello Again Everyone! I seem to be having an issue where when making a comparison between two values in an array, only the first of said values is recognized. ...
[3 replies] Last: // https://ideone.com/QrcGo8 #include <iostream> #include <iterator>... (by cire)
Skipping header lines using istream
 
I am working an an assignment where I use istream to read a text file of weather data into a struct array. My problem is that throughout the file there are head...
[1 reply] : Why not just attempt to read a line of data? If that puts the input s... (by cire)
Check if it's possible to make an integer array strictly ascending by removing a single element
 
I am a beginner in C++. Below is the function I wrote to check if an array can be made strictly ascending by removing an element of the array. It will be great...
[7 replies] Last: Thanks, it's useful to learn different ways of solving the problem. (by ajibpaudel)
by vpham1
i have no idea how to begin with this problem
 
The Human Genome Project is an international effort to discover all of the approximate 30,000-100,000 human genes in the human genome (i.e. the total DNA). The ...
[2 replies] Last: someone please ban the above user ^^ (comologia) for spam and trying ... (by adam2016)
Below Average output
 
Hello everyone! Im pretty new to c++ and was hoping on some suggestions. I'm working on a program now that ask for weights, totals the weights, averages the ...
[5 replies] Last: I agree with nick2361. std::vector is much more powerful than array. (by Thomas1965)
by Baps
Small help needed to complete an arrays assignment! Beginner programming.
 
Hello, thank you for checking on my question! So I am making a program declares an array of 100 doubles. I got it to start displaying the doubles in the correct...
[6 replies] Last: Thanks for all your help, Andy! My compiler wasn't recognizing some of... (by Baps)
using getline() in for loop for n times, but will let me enter n-1 times
 
hello, i'm trying to write a code for entering a number(n) of strings and then fill a vector with those strings, but will let me enter n-1 times using for loop....
[2 replies] Last: Many thanks, I understand now :) (by nick2361)
C++ federal tax program
 
This was my original code below-- I have to add taxRate -float- 6 tax rates and filingstatus -string-4 filing status with descriptions which I have The issue...
[no replies]
*operators returning garbage values
 
Write your question here. The code makes the heroes fight against each other using the *operator. However, when it runs, the winner is displayed in garbage va...
[6 replies] Last: How do you know the number of rounds it displays is off by one? Every... (by Ganado)
Constructor questions
 
Hiya, just tryin to get a full grasp of constructors. Below are questions that my study guide asks. I'm wondering if I answered these correctly. If not, please ...
[6 replies] Last: An important thing to remember is that assignment destroys. The line ... (by Cubbi)
by leorio
Question regarding an if statement inside a for loop
 
Why does this print 6 times instead of 3? I can't wrap my head around the logic behind this. for(int i = 0; i < 6; i++) { if (i < 3);    {     ...
[1 reply] : if (i < 3); Remove the ;. It terminates the if.. Your cout is not ... (by AbstractionAnon)
Building an Application Preferences Class
 
I have just started learning C++ after being a Flex developer for many years. I typically build native applications that operate like custom PPT presentations. ...
[2 replies] Last: I appreciate the suggestion to the JSON parsing library. Ultimately, m... (by jsquared90)
by teppa
Placing blocks issue
 
Hi, I'm pretty new to programming and I'm stuck with an assignment. I'm trying to place blocks in an array in a line for barriers along the sides of the view p...
[1 reply] : shouldn't the Rect() take a variable ? Something like Rect(j,0.0, 32... (by jonnin)
by cash
program not working
 
What am I doing wrong, there is no output. #include <iostream> #include <string> #include <fstream> using namespace std; int main() { ifstr...
[1 reply] : Line 14: This if is not needed. If the file didn't open, line 13 pro... (by AbstractionAnon)
Need help with my code
 
Need help with my code. The programm is done in 90% or more, but doesn't work right. I don't know what to do, because I'm learning c++ for 3 months, but I have ...
[1 reply] : There's a problem with the problem. You have a single word: "a1". Yo... (by lastchance)
identifier, member function is undefined
 
The line 19 gives me an red line error saying identifier apply_damage is undefined. Any guess to why that happens? header file namespace ...
[3 replies] Last: Line 16: operator * is not a member function of Hero. Line 19: Wh... (by AbstractionAnon)
December 2017 Pages: 1... 1314151617... 23
  Archived months: [nov2017] [jan2018]

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