- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
9 Posted Topics
I need to return the numbers of the lotto ticket to main, then call a print() to print the numbers. But the ticketGenerator only returns 1 number. Please help [code] #include <iostream> #include <ctime> using namespace std; int ticketGenerator(int); void printTicket(int,int); int main() { int size; int numbers; cout << … | |
Hi i need help on searching an array for a match. They can be in any order, and does not need to be in a sequence. The theArray has 6 numbers in each row, with 10 lines (i have made 2 to keep things simple). The randArray has 8 numbers. … | |
Hi i'm writing a program that reads records from a file, then sorts these records by the person's firstname, and stores the sorted data in a new file. Heres the code: Everything works fine, except it stores garbage at the end of the last record. If i set the array … | |
Re: This is a really good tutorial [url]http://xoax.net/comp/cpp/console/Lesson9.php[/url] If this is for a school project, be sure to not just copy the source code and make a few changes - you'll learn nothing that way. Goodluck | |
Hi im trying to store the current date and time to a file. When i print it, it is in the US format - MM/DD/YYYY [code=c] #include <time.h> _strdate( dateStr ); cout << "Current date: " << dateStr << endl; _strtime( timeStr ); cout << "Current time: " << timeStr; … | |
Hi im writing a function in a program that lets the user delete a specific record in a file, the user is also able to recover this record. The easiest way i found is when the record is deleted, the record will be set to deleted using bool. Then in … | |
Re: What do you mean by proper values? cin.bad() only returns true if the input is completely unusable. You're probably better off making sure that the input is good using something like isdigit() or isalpha(), depending on what you're looking for. Also have a read of this [url]http://www.daniweb.com/forums/thread90228.html[/url] | |
Re: Heres the logic [code]You will need 2 variables sumOfEven sumOfOdd //Inputting Loop 10 times Prompt and read number If ( number > 0 ) add to sumOfEven numbers Else add to sumOfOdd numbers End if End Loop //Printing //This prints all numbers in a line Loop 10 times Print all … | |
Re: In addition to what Lerner posted, are you allowed to use switch statements instead of multiple if/else? It would make the code easier to read |
The End.