Search Results

Showing results 1 to 8 of 8
Search took 0.00 seconds.
Search: Posts Made By: DavidB ; Forum: C++ and child forums
Forum: C++ 30 Days Ago
Replies: 4
Views: 291
Posted By DavidB
Does the input and output routine have to be in a sub-routine? If not, why not have the loop in the main program. Then you could do the file output loop the same way you output Name on line 41 (and...
Forum: C++ 31 Days Ago
Replies: 4
Views: 291
Posted By DavidB
I notice you open the output file twice: once at line 20 and then again at 33. Perhaps delete line 20.

And your sub-routine abc uses cout to output to the console, but does not output to the...
Forum: C++ Mar 27th, 2009
Replies: 2
Views: 377
Posted By DavidB
True. That is so results can be repeated. For example, if you are using random numbers to fill a matrix for some program you are debugging, you would like the data to be the same each time you re-run...
Forum: C++ Mar 27th, 2009
Replies: 8
Views: 776
Posted By DavidB
To be thorough, you should also wrap the allocation in a try-block and have a catch-block so that, if an exception occurs, it can be properly dealt with.
Forum: C++ Jan 2nd, 2009
Replies: 16
Views: 2,592
Posted By DavidB
What, exactly, doesn't work? The input portion?
Once you input the data, have you outputted it to check if it is wrong or right?

Perhaps you could post the code you have already written, to give...
Forum: C++ Nov 8th, 2008
Replies: 10
Views: 3,554
Posted By DavidB
I stand corrected.

Previously, I had only seen Newton's Method covered in sections of textbooks dealing with finding real roots. However, I have since done some further investigating, and found...
Forum: C++ Nov 3rd, 2008
Replies: 10
Views: 3,554
Posted By DavidB
I don't think Newton's Method can be used to find complex roots. The same goes for the Bisection Method and the Secant Method--all these methods are only applicable for finding roots that you know...
Forum: C++ Mar 28th, 2008
Replies: 20
Views: 24,199
Posted By DavidB
The Sieve of Erastothenes:

http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes

http://mathworld.wolfram.com/SieveofEratosthenes.html

The Wikipedia page includes pseudocode.
Showing results 1 to 8 of 8

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC