Beginners - November 2014 (Page 28)

real clothes shop code help
 
Hi guys . I want to code a program for a real clothes shop. They need to enter many product codes then give the sum at end. The problem is that there are thou...
[5 replies] Last: By reading information into a data structure first like Walnut suggest... (by megatron 0)
by lew13
String function problem
 
Can anyone tell me why this function will not return the string with all of the duplicates erased from the string? void delete_repeats(string & theStrin...
[1 reply] : I think the reason is in my for loop and I cannot figure it out for th... (by lew13)
A simple while loop that isn't working
 
I have this homework assignment that is really simple but for some reason i have something wrong in my code that isn't making it work. We are currently working ...
[1 reply] : Never mind i have figured it out! int main () { //variables char ... (by skimmer001)
need help- logical statement
 
not going anywhere- I know it will start something like this, but not sure how to call it: I mean should I put bool A= ture; bool B=false; bool C= --...
[3 replies] Last: Ah...thank you, wildblue! (by elliott22)
How to strip off characters using strings?
 
I'm doing a pig latin code, and I am only to use strcmp, strcat, strcpy, and strlen and loops to accomplish it. I'm stuck on how to identify if the first two le...
[no replies]
skip over function arguments?
 
Hey so I've written a code with functions to prompt for time in 24 hour format, convert time from 24 hour format to 12 hour format and display both. What I am h...
[no replies]
by NOD32
Problem with File input/output
 
I'm finishing a lab where I have to edit my old one to include file input and output. The program is supposed to read values from a file and perform calculation...
[no replies]
Using Func. to determine if b is multiple of a. Must use return void.
 
Hello, Why wont this compile? I'm lost. Please help. #include <iostream> using namespace std; void FindMultiple(int &, int &); int main() { ...
[2 replies] Last: This is the updated code. Does the job. Thanks Wildblue. #include <... (by samintheoc)
by kal42
loop and counter help
 
so i need help creating a loop once the use get asked to in put for gas and once the loop starts over the counter would then re ask the usurer for gas or to spe...
[no replies]
[RESOLVED] My For Loop Will Not Start
 
Sorry to dump ~20 lines of code on you guys, but this is a function from a bigger program I'm working on that counts votes from a text file. The file goes li...
[6 replies] Last: I sacrificed some readability, but I integrated the two functions toge... (by shrine spirit)
Reversing the order of an array
 
I'm having a lot of trouble doing a homework assignment for class. The directions are as followed: Copy and Reverse Fun.. Create two arrays of strings: For...
[12 replies] Last: Those may be helpful for him in the future but this is for his homewor... (by giblit)
Linked list copy constructor
 
the tmp pointer here is not being assigned with the values from Retrieve function... /////////////////////////////////////////////////////////////////////...
[no replies]
by NaviJ
Vector Help
 
Hi I am asked to write a program that keeps track of students results in a vector. I am to assume that there will no more than 10 results but there may be less...
[no replies]
Time conversion and I/O streams
 
Hey so I got this code that uses a function to prompt for current time in 24 hour format. I now need to write another function that converts the hours to 12 hou...
[no replies]
Still need some help understanding how to properly overload "[]"
 
In order to call a function that overloads the " " operator, do I have to pass the subscript of an array of class objects? or can it be any type of array? The ...
[no replies]
Statements printing twice?
 
I wrote this program to find the target heart rate zone of people depending on their age. The program runs perfectly fine the only problem that I am having is t...
[1 reply] : They print twice because you call the function twice, once on line 25 ... (by jlb)
by Auroch
Integral evaluation
 
Hello! I'm trying to write a program to evaluate a definite integral with Simpson's composite rule. http://picpaste.com/pics/12-GXeA9MIK.1416154254.png I ...
[3 replies] Last: if i1 or i2 is a double, then use if (fabs(i1-i2) < eps) ... ... (by dhayden)
C+11 and pair
 
is it possible using pair to store element separately, so that you first store the first value and then next the second element, if yes how come?
[1 reply] : Your question really doesn't make much sense. Perhaps you could clarif... (by jlb)
random number generator: Keep track of certain numbers
 
Hello, I am writing a program that generates random numbers with in the range [0,2]. I want to keep track of how many zeros are generated. I thought I had it wi...
[4 replies] Last: Thank you. Seems so obvious after the fact but obviously not for me. (by samintheoc)
Creating a loop that checks for characters in a doc
 
I'm suppose to write a code that checks all the data in a text file but every time i check each data file the result ends up equaling 283 and I don't know why ...
[4 replies] Last: This would be easier if you used an array instead: Create an array wit... (by dhayden)
November 2014 Pages: 1... 2627282930... 65
  Archived months: [oct2014] [dec2014]

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