Beginners - March 2015 (Page 23)

Sorting and Arrays
Hi all. I am supposed to write a program that will read some number of floating point data into x and then compute the sum, the mean and the median of these dat...
Mar 17, 2015 at 11:38am
[9 replies] Last: Line 52 is in the wrong place. Since it's inside the loop, you are ret... (by dhayden)
by oseri
Operator new overloading
Hi there , I have a few questions : 1) I've read that something like this int *a = new int; is actually a "new expressions" that calls the "operator new" ...
Mar 17, 2015 at 9:10am
[6 replies] Last: OK, thank you for your help :) , I must have been really tired that I ... (by oseri)
by Tanner
Strings
So I've been following TheNewBoston's tutorials and I think I've made good progress. But this tutorial his guide just left me in the dark. He introduced a new...
Mar 17, 2015 at 5:22am
[4 replies] Last: > He introduced a new term he hadn't used before, string. What is this... (by JLBorges)
by gelier
Basics of Array
Given that an array of int named a has been declared with 12 elements and that the integer variable k holds a value between 0 and 6. Assign 9 to ...
Mar 17, 2015 at 4:18am
[2 replies] Last: a[k+1]=9; (by agamatr)
Output result in tabular form
Ok So I am doing an assignment(I will not lie about this..) And Now I got stuck at the very last bit of it. So my program needs to run the craps game(roll di...
Mar 17, 2015 at 4:13am
[3 replies] Last: The first roll means the selection 1 right? I will read through this ... (by FrankRafa)
by Orval
Can you do multiple values on a switch statement?
In the following code im trying to make it to where the user can enter either 1 or 2 to get the same result. I was wondering why this isnt working considering y...
Mar 17, 2015 at 3:53am
[4 replies] Last: Mmmk, was just checking if those were valid in switch. Thank you. (by Orval)
Calculator for decimals
I made a calculator but need help making it use decimals instead of just whole numbers. What do I need to add to my code? #include <iostream> using n...
Mar 17, 2015 at 12:55am
[8 replies] Last: > Why did you put std:: before all the cout/cin statements? See http:... (by JLBorges)
by SCB3
Having issues with Drawing a grid
i
Mar 16, 2015 at 10:45pm
[2 replies] Last: yep thats what I mean, not sure how to get the lines to show though (by SCB3)
by thor36
Internet sockets learning question (Beej's guide)
Greetings all I would like to learn about network programming in C++. After some searching I find most recommendations for the Beej's Guide (http://beej.us/gui...
Mar 16, 2015 at 9:01pm
[7 replies] Last: Thanks Computergeek01, that was a very informative and straight answer... (by thor36)
by hmlwin
Wrote program to sum terms, but can't get it to give me the correct summation...
I wrote this program to sum a user-defined number of terms for the series 1-1/2+1/3-1/4+1/5-... But for some reason it's not working. I have went line by line...
Mar 16, 2015 at 8:44pm
[1 reply] : 1/n == 0, when n is integer and 1<n. (Integer division discards the re... (by keskiverto)
What's wrong with my code?
Write your question here. My code was to have a loop that asked 5 math question; ignoring division. It keeps telling me my error is on my totalsum=num1*num2 ...
Mar 16, 2015 at 8:19pm
[8 replies] Last: Another problem with your code is that lines 16 and 24 use the assignm... (by AbstractionAnon)
by HelenI
Stack
Hi. How can I push an item to the bottom of a stack?
Mar 16, 2015 at 6:30pm
[10 replies] Last: thank you :) (by HelenI)
Sorting array of classes
Hello. I used this ( http://www.cplusplus.com/forum/general/97555/#msg523529 ) example to sort an array of classes. But what if I want to modify "Option 1" (mad...
Mar 16, 2015 at 4:42pm
[3 replies] Last: std::tie returns a tuple of references. And tuples already have well... (by MiiNiPaa)
by HG319
recursive linked list function
I have this function to get an entry in a linked list but I have to make it recursive. I was wondering if anyone can help. template<class ItemType> Item...
Mar 16, 2015 at 3:38pm
[no replies]
deleteContact() function: can't delete contact
I am writing a contact list program and I wrote a deleteContact() that.. deletes a contact. However I don't know how to delete a contact so that it actually get...
Mar 16, 2015 at 3:13pm
[1 reply] : Hi Jakeculp, Without knowing much about advanced file editing in C++,... (by Aaron Vienneau)
read and write to text files
hi, i am trying to read a list of names from a txt file and then sort it out. Once sorted i will have to write them to a new txt file. i have done this method m...
Mar 16, 2015 at 11:08am
[11 replies] Last: ^yes. That sort was a given that we had to use. I am aware of simpler ... (by rremigoso4310)
RNG using xorshift
Hi, im trying to generate random numbers in a range 1 - 100 but i only keep getting 1 number each time (at least that is random) Im using this code i found in ...
Mar 16, 2015 at 10:28am
[3 replies] Last: Ohh yea, now we are talking :) Thanks guys so much so much :) (by etrusks)
by MrGoat
Minesweeper multi-dimensional array problem.
I am trying to create a minesweeper game and I am running into a problem setting up and populating the board. My intention is to create a 9x9 array and use a p...
Mar 16, 2015 at 8:52am
[1 reply] : Since the index starts with 0 only indexes from 0 upto 8 (this are the... (by coder777)
File and String Program Not Running, in plain C lang
Hi my code is not running so I ask that someone test this for me and also review if my logic and syntax is correct. The assignment is to write a program that...
Mar 16, 2015 at 8:33am
[1 reply] : First On line 14: The name of the file is "Battle_ship.txt". Are you s... (by coder777)
Passing 2D Vector to a function problem
Hello, I've been trying all day on how to pass a 2D Vector to a function using parameters. I've tried passing by reference but I've been getting the error "type...
Mar 16, 2015 at 4:03am
[3 replies] Last: I don't know your code, but I assume that you have a private variable ... (by ats15)
March 2015 Pages: 1... 2122232425... 51
  Archived months: [feb2015] [apr2015]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.