Search Results

Showing results 1 to 6 of 6
Search took 0.01 seconds.
Search: Posts Made By: sillyboy ; Forum: C++ and child forums
Forum: C++ Jun 4th, 2009
Replies: 11
Solved: Object trouble
Views: 441
Posted By sillyboy
well a map is going to associate a key with a value, so if you set your keys to your planet names and the values to your objects (planets), you can retrieve them based on the name (key).
Forum: C++ Jun 4th, 2009
Replies: 11
Solved: Object trouble
Views: 441
Posted By sillyboy
what are you trying to do?

input.moons would mean you are trying to get the moons of a string...
Forum: C++ Nov 9th, 2007
Replies: 12
Views: 7,117
Posted By sillyboy
cout << table[row][column];

Are you sure this is what you want to be doing?
In regard to implementing the random integers, you can just assign them as you print that particular cell. So add...
Forum: C++ Oct 15th, 2007
Replies: 7
Views: 2,859
Posted By sillyboy
I appologise about the ^2, you are correct here. I assume those "2"s are supposed to be in superscript :). Anyway I felt nice so:

#include <iostream>
#include <iomanip>
#include <cmath>
...
Forum: C++ Oct 15th, 2007
Replies: 7
Views: 2,859
Posted By sillyboy
pi = sqrt(6* (1/(1)2 + 1/(2)2 + 1/(3)2+ 1/(4)2 + 1/(5)2 +...... + 1/(n)2))

Ok, so looking at this equation you have the series of summing 1/(n)2 . This is not equivalent to the sum of 1/(n^2).
...
Forum: C++ Oct 15th, 2007
Replies: 7
Views: 2,859
Posted By sillyboy
for (count =1; count <= terms; count++);

This pretty makes your loop useless, you don't want that semi-colon.

You also need to check the logic behind the steps you take to calculate pi. E.g. I...
Showing results 1 to 6 of 6

 


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

©2003 - 2009 DaniWeb® LLC