Beginners - October 2014 (Page 58)

infix to prefix
 
how can i turn a infix string input and convert it into prefix? ive read some stuff online and it doesnt really make sense to me. if anyone could explain the me...
[7 replies] Last: @andrewthecoder This is not a good exemple (by closed account 28poGNh0)
Why won't my C++ program work?
 
This is my current program: #include <iostream> using namespace std; int sumdivisors (int divisor); int prime (int numb); int main(){ cout << ...
[2 replies] Last: I just glanced over it, but it seems you are dividing by 0 when diviso... (by druid84)
Using a struct in my class
 
How do I integrate a struct I created into my class? Here is my header file: struct Tetromino{ std::string texture_file; sf::VertexArray squares_...
[4 replies] Last: Ok so the error was fixed by removing Tetromino from the parameters in... (by wh1t3crayon)
how to determine if a input string is valid
 
so for this program the first steps i have to do which ive never done before is i have to determine if the input is a valid input the requirements are i need sp...
[8 replies] Last: why not, loop: if '(' --> start++, if ')' --> end++ ; if start == ... (by anup30)
by Jhub
why does only half my code work?
 
Hello I wrote the below program to turn encrypt, it turns "a to z" "b to y" "c to x" etc. but the problem is, it is only working on some letters about half an...
[4 replies] Last: you can add "continue;" for each if. but algorithm is better than har... (by anup30)
if statement ?
 
if firstPrice<secondPrice then the firstPrice is discarted but if its the other way around then the secondPrice is discarted. cout << "the first price is di...
[4 replies] Last: computers dont have any personal choice. without specific instruction ... (by anup30)
Program still does not work with my changes!
 
This program still does not work with my current changes. // The program will read ten names form the user's input and compute // // the grade for eac...
[6 replies] Last: thank you, hyperfine. done. How can I make the program accepts just th... (by David623)
char array with pointer multiple lines of text
 
how to store multiple lines of text in a char array and display to the screen? no help needed. this is the question and the answer. putting this here for ...
[5 replies] Last: windows 7 has xpmode which has a dos shell that can run dos apps :) w... (by closed account 1CfG1hU5)
Encrypt function
 
Hi everyone, I am trying to write a code taht gets an alpahbet and return teh previous letter, except for Z or z that must return 9.. I dont know what I am do...
[no replies]
Can someone finish the code?
 
The question: When equal amounts are invested in each of three accounts paying a1% a2% and a3% interest, one year's combined interest income is $S. How much ...
[3 replies] Last: cout << "x = " << (double)S/0.06; Edit: oops, that was not correct... (by anup30)
Search function causes program to hang
 
My code works until the isInArray function finds the value its looking for. If the value is present in the array, the program hangs. Por que? /* * Fi...
[4 replies] Last: @Smac89 and @Ganado That worked! { bool found = false; int... (by roark burney)
Width and Length
 
I need helping coding this in c++. the output should look like this... i know i have to use string and get line() but an someone give me a start. Enter ...
[no replies]
Stacks and balancing
 
I am using stacks to create a balancing program. I would like the user to input the name of the file to be checked for balancing but when I enter a file name l...
[8 replies] Last: First : '(' , '[' and the others are one character unless '*/' and '/*... (by closed account 28poGNh0)
error: return-statement with a value, in function returning 'void' [-fpermissive]
 
error: return-statement with a value, in function returning 'void' [-fpermissive]What does this mean in reference to the code? void exit_program (void) ...
[1 reply] : void means dont return anything . yet you return EXIT_SUCCESS... (by shadowCODE)
error: expected ';' before string constant
 
error: expected ';' before string constant Why does that error keep occuring? cout << (1) "Add a value" << endl; cout << (2) "Edit a value" << ...
[3 replies] Last: Thanks it worked (by Magnes34)
The 3n + 1 problem
 
The 3n + 1 problem Consider the following algorithm to generate a sequence of numbers. Start with an integer n. If n is even, divide by 2....
[8 replies] Last: Thank you. I finally solved it. (by stefoka)
Reading Integers from 2 text files and Merging into another text file
 
Hi, I am struggling to get my program working. The directions are to write a program that reads sorted integers from two separate files and merge the co...
[2 replies] Last: oops... deleted my post while editing. your while() loop is now techn... (by Esslercuffi)
Help making classes
 
I know this is asking a lot but it will really help me learn. So I have trouble making classes because I flub up information exchange and stuff like that. Basic...
[9 replies] Last: Thank you very much @turtlesavage, l am totally newb but am trying to ... (by closed account SECMoG1T)
by slovit
switch case where did i go wrong
 
Needs to show total price with tax of four different apple type using switch case #include <iostream> using namespace std; int main(){ c...
[2 replies] Last: #include <iostream> using namespace std; int main(){ char applet... (by slovit)
Creating Unique Pythagorean Triples in VS2013
 
Hi, I'm rather new to programming, and while I get a lot of the concepts, I have trouble when trying to implement math concepts I don't understand into the prog...
[5 replies] Last: #include <iostream> #include <iomanip> using namespace std; int mai... (by shadowCODE)
October 2014 Pages: 1... 5657585960... 70
  Archived months: [sep2014] [nov2014]

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