Beginners - September 2015 (Page 4)

A menu run-time error code, help please!
 
I'm getting a run-time error where if I enter '2 2' for the first cin, it says y variable is being used without being initialized, then if I enter '3 2' at the ...
[2 replies] Last: Thanks, that solved my problem! Also, do you know how to set it so whe... (by Toothless LL)
String
 
Hello! Why would I write movieTitle = "Wheels of Fury"; cout << "My favorite movie is " << movieTitle << endl; Instead of writing ...
[2 replies] Last: To add on to that, a basic intrinsic value of having variables, as @Th... (by YFGHNG)
Bitcounter Function Help
 
Im looking for a single expression that counts the number of bits in an integer to replace the 0 of the return in the function I cant use any loops, so im very...
[2 replies] Last: Thank you so much liuyang. that was very helpful (by dvdbeedy)
HELP with program!!!
 
Can someone write up this code for me im self teaching myself just need a run through how it looks. A program that calculates the average monthly rai...
[2 replies] Last: thanks man this is pefect i undestand it perfectly (by rave2014e)
Easy do-while loop help!
 
Complete the do-while loop to output 0 to countLimit. Assume the user will only input a positive number. I have no idea what I'm doing. Any help would be app...
[4 replies] Last: Hi, When using scanf , make use of the value it returns, so you can ... (by TheIdeasMan)
calculate amount of salary received based on position level
 
Here the question. A company owned by First Avenue has a salary system based on position level. Employee salary is being paid on a weekly basis. The company ha...
[6 replies] Last: Hi, Sorry for my late reply, I have been busy trying to rent a house :... (by TheIdeasMan)
Question about Max and Min program
 
Hey guys so I'm writing this program for my class and it asks for us to somehow be able to allow the user to input a number with a weight behind it. "You will n...
[2 replies] Last: My apologies, yes that is what they want to be inputed. My question is... (by CaptainKirk)
Syntax error with a function
 
I am working on a code which will allow me to print out a calendar given the year and the starting day of the week for jan 1st (0=sun...6=sat). I've come to ...
[1 reply] : Please use the code formatting tags (<>) on the right. It makes read... (by integralfx)
Program not working, please help!!! :/
 
I'm having trouble getting my program to work. It displays the messages requesting the information in the main function. But it doesn't calculate any of my fun...
[1 reply] : Please use the code formatting tags provided, on the right hand side (... (by integralfx)
by HG319
Average depth of tree
 
I have project where I create a BST and now I have to compute the average depth of the tree, and then compute the ratio of the average depth to log2(n). I am r...
[3 replies] Last: You want to initialize LeftD and RightD to 0, because otherwise th... (by DyslexicChciken)
Reading commands from a file
 
I'm making a program that has a Stack and Queue class, and it's supposed to read a text file that has commands and data on it like this: push 10 pop serve ...
[1 reply] : Read the operation first. Then decide if you need to read an operand. (by kbw)
Interleaving Characters
 
My code is supposed to interleave two arrays of chars. I think I have nailed it down. I feel that the way I am doing it might be a bit to complex so if anyone h...
[3 replies] Last: interleave = '\0'; you're writing to the wrong place. try finallen -... (by liuyang)
by Marth
Help with Storing Names in Array
 
I have a text file that has ranked baby names, 1000 of them. This is supposed to go through the text file and then see if the input matches the name, and then...
[3 replies] Last: Thank you very much Megatron 0 and Duoas. I appreciate the multiple e... (by Marth)
by Winsu
Function not declared in scope
 
I have made a class and I have an operator overloaded...I have a few members functions (they are members because they use the member data)....I have declared a ...
[3 replies] Last: yes, It doesn't thanks (by Winsu)
Implementing concordance with a linked list
 
/closed
[13 replies] Last: It is opening the file. I made a function to check that and i just did... (by stevecaboose)
Collatz Conjecture
 
I'm currently having some trouble making a C++ program for the collatz conjecture using a while loop nested inside of a for loop. After numerous rewrites, i've ...
[no replies]
by HG319
removing every other node in tree
 
Given a bst how can you remove every other node in the tree Here is the code for removing one node in the tree and also deleting the whole tree. how can i mo...
[no replies]
by Marth
How to check if cin is int or string?
 
How do you check if the user input is actually a string or an integer? i looked it up on the internetz and there were a number of different ways, but it does...
[2 replies] Last: Thank you, that is very helpful references. (by Marth)
Having problems with my program, please help!! :/
 
I'm having trouble getting my program to work. It displays the messages requesting the information in the main function. But it doesn't calculate any of my fun...
[1 reply] : don't you need ampersands in your void arguments, on the variables you... (by Marth)
by Winsu
operator () overloaded
 
I have my class complex with most of the facilities needeed to do operations... I have created a Add class with the goal of overload operator () (just to le...
[1 reply] : well, I have just found out that without putting the dot operator(line... (by Winsu)
September 2015 Pages: 123456... 42
  Archived months: [aug2015] [oct2015]

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