The numbered elements in the array correspond to other values. I need check each element to see if been used or not. For examp. each pass thru a number is called, when a number is called, i need to tell the array true for that array element. If prog is going to call a value of 14, first of...
Can someone advise on how to create an array with bool values? How you tell each element of bool array if record exist or not? Keep simple as possible.
I trying to calculate number of days between one date and another. I have good idea of how to do this but not sure efficient. What is the proper algorithm? How you also compute new date given one date and a number of days? Please keep algorithm simple as possible.
I think I figured it out. I fixed it when I changed it to this:
Read record from file
loop while NOT EOF
{
...
...
...
read next record from file
}
I originally did not have the first read before the loop. Do you always have to put the first read before the loop? That solved my issue, but...
Hello,
I am coding a program that inputs data from a file. I have a loop that will input each line and then output each line. I have the while loop set as:
while (! file.EOF())
{
...
)
For some reason, the loop will process and output the last record in the file twice. For example, if my...
I need some advice for getting the min and max from an array. I have a loop that reads the number and then calls a void function to do the calculations. My call by reference parameters/variables are not working right. When I output the results to the screen, it shows the max and min as the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.