General C++ Programming - November 2017 (Page 2)

by jge162
AVL tree help - C++
 
I need help with two functions. One I need my OSTREAM to upload into a AVL tree. what am i doing wrong? my output keeps coming back size() =0 also i thnk it is...
[1 reply] : my output keeps coming back size() =0 In your Write(...) function w... (by coder777)
for loops using arrays, help please!
 
// This program stores, in an array, the hours worked by // employees who all make the same hourly wage and then // prints a list of employee numbers and thei...
[1 reply] : Looks like you need a refresher on arrays: http://www.cplusplus.com/do... (by Thomas1965)
binary files
 
Years ago I wrote a program that created binary files. Now I can't read the file. What I am interested in doing is reading this file and rewriting it as a text...
[9 replies] Last: You're welcome. I did think afterwards that I made use of some C++11 f... (by Chervil)
Some problems with C++ assignment
 
Hello, I have an assignment due in about an hour and I have it working, there's just things going on with it I'm stuck on how to fix: 1. I have a part of the p...
[1 reply] : Nevermind, I figured it out myself lol. (by ReveriesDream)
by imren
please helping!!!!!
 
Could anyone solve this question please? This is my exam question.I have to pass this exam.Please help me!!! Write a function named float* max(float a , int ...
[1 reply] : You've got it wrong. Exams are to verify that you have learned the top... (by keskiverto)
Array of Structures
 
Hi all, I'm having a little bit of trouble with my code about structures. I posted the question, and I have a little bit of code. Any suggestion will help! Tha...
[10 replies] Last: Thank you all for your help! I got it! #include <iostream> #include <... (by juddbloodd)
Help on Arrays! Really don't understand, sample code would be very helpful!
 
Use proper programming practice and modular programming. Write a program that asks the user for a file name. Assume the file contains a series of numbers, each...
[1 reply] : Okay here is some sample "code" to get you started: http://www.cplusp... (by jlb)
coffee order program
 
hello. i need some help. program is this. ---------------------- this is coffee order program.(finish:Q/q) *order espresso >> latte *add something(milk)...
[2 replies] Last: I am sure you are familiar with the concept of class, and the use of g... (by Kourosh23)
Maximum Binary Heap Removal
 
I have a maximum binary heap implemented as a priority queue. The below code works fine. I need some clarification to know if my remove function is doing O(log...
[2 replies] Last: I figured out the answer to my question, and I decided to share it her... (by Kourosh23)
ADL inhibited if the name of the function is enclosed in parenthesis??
 
Hi, I found this phrase which I don't understand and it's about ADL lookup: <comment> ADL inhibited if the name of the function is enclosed in parenthesi...
[7 replies] Last: That's it!! As usual JLBorges comes with the right answer! Thanks!! J... (by JUAN DENT)
I am stuck on 2 and 3
 
Exercise #1: Write a program that declares a two-dimensional array named myFancyArray of the type double. Initialize the array to the following values: 23 14...
[1 reply] : #2 might look something like this (warning, I did not debug, test, or ... (by jonnin)
need strange symbols in output
 
i need to create a symbol output from an imput as if the input has been courrupted the out put needs to be the same amout of charecters as the input and the sam...
[1 reply] : You can use casting: char getRandomCharacter() { int randASCII = ran... (by goldenchicken)
by bonho
template class specialization
 
I would like to have a template class that can automatically detect whether its template is of the form std::shared_ptr<T>. In particular, I would like to impl...
[2 replies] Last: my 2c using type_traits: #include <iostream> #include <memory> #incl... (by gunnerfunner)
Tenzi C++
 
I don't even know where to start. I made a sort of pseudocode: Create a C++ program to play the game Tenzi. There will be two modes of Tenzi to play, Tenzi a...
[1 reply] : Can you show us your pseudocode? (by MikeyBoy)
How to skip the new line in file reading
 
I'm reading the text from file sentence by sentence, I'm using the full stop(.) as a delimiter. If there is a new line character in between a sentence, how can ...
[3 replies] Last: #include <iostream> #include <fstream> using namespace std; int main... (by lastchance)
Get the program to apply time and a half to all weeks.
 
In my code, I am trying to enter four weeks worth of hours and get the weekly total and then total all four weeks for a gross pay for the month. My code applies...
[1 reply] : At lines 25-29 you have a loop where the hours are entered. Inside tha... (by Chervil)
Need some help with explanation c++
 
Define a void function that will assign every element in an integer 2d array to 0. How does the function call and function prototype differ between statically ...
[5 replies] Last: Hah yeah what a mess. I wouldn't actually use 2-d arrays either. (by Ganado)
value returning function problem
 
I have tried this program & ran it like 10 times on the compiler on mindtap yet it still does not give me full credit. here's the code #include <iostream> ...
[4 replies] Last: that's error prone. may do letter = std::tolower(letter); inside the... (by ne555)
xor of every subarray in an array ?
 
given an array with length n, with every number <= 1e6, as there are n(n+2) / 2 subarrays there will be the same number of XORs (xor of every subarray elements)...
[6 replies] Last: thank you (by mohamedeltair)
by yukine
solovay-strassen test
 
HI! This is primality test and this code is giving only "else condition"(thought it shouldn't) with any number given, but I don't know why... any advices or fou...
[1 reply] : write out the results of each part. write out the result of the mod()... (by jonnin)
November 2017 Pages: 1234... 16
  Archived months: [oct2017] [dec2017]

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