Beginners - October 2012 (Page 55)

by paetim
shipping charges
 
I am having trouble getting the final total amount correct, what am I doing wrong? please help! A shipping company calculates charges based on parcel's weigh...
[4 replies] Last: thank you so much. Figured it out and you guys were right. (by paetim)
Function that reverses a string?
 
Basically I'm supposed to write a program that computes the reverse of a string. for example the word "flow" would be "wolf". the book says to to start at the s...
[1 reply] : C++ has the function reverse() , so normally you wouldn't need to do ... (by Cubbi)
Need help with a stupid question.
 
So just switched to VS 2012 from codeblocks, and im having trouble with the cin >> word;. The error code I get is this Error: no operator ">>" matches thes...
[2 replies] Last: Ohh god feel so dumb right now lol knew it would be something stupid l... (by closed account 3qX21hU5)
IF statement not working in basic menu
 
Hi, I have to design a simple menu for my program, where a user presses a key corresponding to their menu choice. However, no matter what button they press, i...
[3 replies] Last: if (menuChoice == 'I' || 'i') This is evaluating to "If ((menuChoi... (by Moeljbcp)
Printing to file, multiple program runs.
 
Hey, I'm working on a voting machine, and I ran into a problem. Here is the code: #include <iostream> #include <cmath> #include <fstream> using namesp...
[1 reply] : Then use the ios::app flag as a second parameter for open(); funct... (by Aceix)
output every n terms
 
I did a infinite series program that would output all terms as it ran. How would I change it to output only every 100 terms? Also, if I wanted to output only th...
[4 replies] Last: I thought about doing a for loop earlier but the series uses a for and... (by bowlbase)
Program giving date
 
I have worked more on this program lately and believe I am almost done but there is one last part i am struggling with; the year. The code i currently have ...
[no replies]
MessageBox
 
Can I use format in MessagBox::Show? I want to use like below. char *filename; filename = "test.txt"; .... .... MessageBox::Show ("Failed to open file...
[3 replies] Last: Then I've not heard of MessageBox::Show before,but just MessageBox(... (by Aceix)
C++ Classes help
 
Is this right? I feel like im doing some silly mistake but can't figure it out. I keep getting diffrent errors. #ifndef BANK_H #define BANK_H #include ...
[1 reply] : You shall delete the allocated bankAddress in the destructor. It is ... (by vlad from moscow)
How do i compare two objects in a string?
 
Please help If i have : String K1 (R3, R1, R2); String K2 (R6, R4, R5); Please help on how to compare both of these strings.. (R1 for example has first ...
[18 replies] Last: Let's approach this from a different angle. Suppose you have a phone ... (by cire)
function return problem
 
My program asks for a value then returns a hailstone sequence for each value 1 to n and counts how many numbers are contained in each sequence, then returns the...
[1 reply] : pass the two variables as reference and assign the values to them in t... (by codewalker)
by nahla
Do these following input data lines work correctly?
 
1) User Input: 24 25 26 int first, second, third; cin >> first >> second >> third; 2) User Input: 24.4 25.5 26 double fourth, fifth, sixth; cin...
[4 replies] Last: What happens in scenario 3 is that 24 is extracted from the stream int... (by cire)
Passing an array of structures using a pointer
 
Hey guys, I'm having some problems with a program I'm writing for my class. One of the steps calls for me to write a function that uses a pointer to a structure...
[7 replies] Last: That worked perfectly, thank you. And sorry for the simple questions. ... (by jmeadors24)
How to convert string to int, and check for errors...
 
I am used to programming, as a hobbyist, in C#. I've been trying to get accustomed to C++, but, I have been having issues accomplishing a simple task. I want...
[4 replies] Last: You are correct, '+' being a valid symbol at the beginning of a number... (by cire)
by ShaoC
prime number testing
 
Testing prime number. could anyone pls help me to look for the error here, when i input 13, a prime number, it is not working properly. thanks a lot. #incl...
[2 replies] Last: i got it thanks for your time, =] (by ShaoC)
by ShaoC
while/if
 
Hi,I'm a beginner of c++, here are two questions that I need helps with. I dont know why there's no output comin out for this two programs. Thanks for your ti...
[5 replies] Last: isee, thanks alot! (by ShaoC)
print function in classes
 
Can someone please help me to implement a function that will make my output look like this: Box# Box Type Volume(cu/units) 1 Square 9 2 Rectangular ...
[4 replies] Last: ok mom (by ilovelearning)
by skarla
help
 
I want set up SDL. Is anyone that can help me giving me tutorial or skype so do it for me>?
[1 reply] : have a look at http://www.lazyfoo.net , and follow the instructions pr... (by Fransje)
by tgeo
Struct variable not remaining
 
I have the below code and I am trying to simply assign an integer (for testing purposes) to a variable inside a struct, which itself is inside of a class. I am ...
[2 replies] Last: I knew it was something like that, I assumed it would pass the struct ... (by tgeo)
Problem with modulus division
 
Can someone help me figure out how to use my modulus division for the thousands and hundreds within my code I think they're wrong. #include <iostream> usin...
[5 replies] Last: Glad it was some help. Actually, in the first version, there are sep... (by Chervil)
October 2012 Pages: 1... 5354555657... 84
  Archived months: [sep2012] [nov2012]

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