Beginners - April 2017 (Page 3)

Binary Search help
 
Hello, I am having trouble compiling this code that finds a number in a given array using a binary search. I was able to get most of it with help from my book ...
[6 replies] Last: [Linker error] undefined reference to `binarySearch(int const*, int, ... (by wildblue)
Average of numbers input by user
 
Hi, I am new here. I am pretty new to C++ and I want to solve a problem with the following statement: "read numbers inserted by keyboard until user press 0. Sh...
[11 replies] Last: And welcome to the forum, JorgeChemE - glad you were able to get your ... (by wildblue)
need help with classes and headers
 
I have a final due friday and i'm really trying to impress my teacher. I've been studying header files and using classes. Trying to make a War Games global ther...
[7 replies] Last: thank you so much, you solved it. What i don't get was why it was sayi... (by mrphilipp7)
random number help
 
hi guys! i need to generate a random number which must be between 3 and 10 and it must be an even number; is there any code you help me with? thanks by the w...
[13 replies] Last: Instead of putting a blanket using namespace std; at the top of the ... (by wildblue)
How do I code for two 4x4 2D Arrays?
 
I'm supposed to code for 2 4x4 2D arrays and transpose them and multiply them. However, I only know how to generate one 4x4 2D array and transpose them. Her...
[no replies]
by xx123
c++
 
abc
[1 reply] : You have a couple of options. 1) You could derive separate BalanceIn... (by AbstractionAnon)
how to run commands
 
hi guys! i needed a help in my code; i must ask user for input, he must respond to it within 7 seconds. if not, it should display, "you take a long time to t...
[no replies]
by arbwok
Unordered_Map insert not giving me pointer
 
Hello I'm having trouble with my unordered_map insert. My insert takes a Comparable, which is a template, and a BinomialNode* and inserts the Comparable as the ...
[3 replies] Last: I'm having problem with my deleteItem function. It's suppose to delete... (by arbwok)
C++ convert struct to class
 
Hello, I just want to have couple question about this code, I am currently converting a struct to class. Problem is I have never encounter writing a program wi...
[4 replies] Last: You're still missing a couple of points. 1) A student record object... (by AbstractionAnon)
IQ Test program question - I'm confused...
 
Create a program that takes IQ scores and provides as output the following qualitative description: Under 100=Below Average 100-119=Average 120-160=Superio...
[3 replies] Last: @jonnin --- That is apparently exactly what they meant. thanks @kemo... (by xerxes2985)
How do I sort an array of objects according to enum value?
 
I have to create a function called 'void SortStks (Stock stks , int size)'. This function is to sort the array of passed Stock objects according to increasing ...
[11 replies] Last: class Stock { public: enum Sector { Technology, Health, F... (by JLBorges)
Sorting arrays help.
 
Hey guys, i missed class this week and i had a assignment due and i am just completely lost can someone help me with my program. I need to get the user to input...
[1 reply] : Your data-entry section (lines 18-29) is unnecessarily complicated, as... (by gunnerfunner)
Game of Life
 
Coding Conway's Game of Life is my final project for my C++ class. I have pretty much assembled the code I'm just having a few logistical issues. The board is...
[2 replies] Last: Take a look at the function neighbors(...) line 23: It doesn't make se... (by coder777)
Another way of writting
 
What would be another way of writing this? max(max(population1, population2), max(population3, population4))
[3 replies] Last: max (max (population1, max(population2, max (population3, population... (by chipp)
by DAFT25
Reading a table from a .txt file and printing a 2D array
 
This is a homework question, but the answer I seek is not for the entire homework; this is only the first part of it. The rest is simple calculations that I nee...
[2 replies] Last: @daft25 Array indices in C++ start at 0. So you will be writing beyon... (by lastchance)
Read Data from text file to Class private members
 
I just need a really quick question. So I can tackle with normal class and how to do them but I am not sure how to actually read data from text file into 2 cla...
[3 replies] Last: 2/ a. That line I was trying to figured it out a way to printing out ... (by jlb)
by jaimxx
Help please (summation, exponential and factorial)
 
General textbook question, Write a program that asks the user for a positive integer value. The program should use a loop to get the sum of all the integers fr...
[no replies]
Converting a string from getline(fileIn, Cstring) to integers.
 
Hello, I have read many suggestions, I actually copied one, and I cannot convert from file of strings to integers. If I create my own set of integers (mystri...
[8 replies] Last: gunnerfunner: I just created a text file myself, did not copy and pa... (by HappyS5)
Question about boolean functions
 
So, our professor had asked us to make a program that displays a 5 X 5 board and randomly places bombs. I did that. Now, we are supposed to use that same progra...
[2 replies] Last: so i am trying to do something that may or may not be possible. Curren... (by pdgaming)
by Mahmgl
Spacing problem
 
I have a problem with spacing in a Phonebook program where I want to tabulate contacts in this form: cout << "-----+----------------------------------------...
[1 reply] : How can I adjust these spaces so that the "|" seperator can be at a f... (by gunnerfunner)
April 2017 Pages: 12345... 34
  Archived months: [mar2017] [may2017]

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