Forum: C++ Jun 26th, 2009 |
| Replies: 7 Views: 427 very open ended question, and many possible answers. i think you are going to need to provide some information on your design (not just interface) to get solid answers.
if it were me, i would be... |
Forum: C++ Jun 23rd, 2009 |
| Replies: 14 Views: 492 I get the impression you aren't really trying here, produce some updated code with what you are trying...
maybe then I can give more assisstance. |
Forum: C++ Jun 23rd, 2009 |
| Replies: 14 Views: 492 no, it's definitely not the right way. for a start, the counter should form your loop's condition statement (hint 1). furthermore, even if you were using your counter as part of the condition it... |
Forum: C++ Jun 23rd, 2009 |
| Replies: 14 Views: 492 do you know the concept of a counter variable? perhaps it will help you.
using a single variable x, you can only store the current value. you need to be able to store a cummulative values (which... |
Forum: C++ Jun 23rd, 2009 |
| Replies: 14 Views: 492 what your code currently does is, it stops when any single amount is greater than 1000. you need to come up with a way to "keep track" of what has already been allocated. |
Forum: C++ Jun 4th, 2009 |
| Replies: 11 Views: 440 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 Views: 440 what are you trying to do?
input.moons would mean you are trying to get the moons of a string... |
Forum: C++ Apr 15th, 2009 |
| Replies: 2 Views: 257 surely there is more to it than that... you haven't defined any of the functions.
also, use code tags. |
Forum: C++ Dec 26th, 2008 |
| Replies: 1 Views: 271 What exactly is the problem? |
Forum: C++ Nov 13th, 2008 |
| Replies: 2 Views: 371 What exactly are you having problems with? You have a good base there already, all you need to do is fill in those functions and use them. The implementation of the functions should not be too... |
Forum: C++ Nov 8th, 2008 |
| Replies: 5 Views: 1,002 I don't think you will find a tutorial for Hangman. You will instead want tutorials to understand the concepts required to create the hangman program, and it is up to you to decide what these... |
Forum: C++ Nov 7th, 2008 |
| Replies: 3 Views: 380 It is so hard to help when we don't know where you are up to. And if you haven't actually done anything, how will you ever learn? |
Forum: C++ Jun 24th, 2008 |
| Replies: 4 Views: 589 I think you are overcomplicating it, just google scheduled tasks. You should able to create one easily using the tools provided by windows. |
Forum: C++ Jun 24th, 2008 |
| Replies: 4 Views: 589 You don't want to just use the "scheduled tasks" that windows gives you? |
Forum: C++ Nov 23rd, 2007 |
| Replies: 9 Views: 1,077 As a "newbie" isn't this a little ambitious? |
Forum: C++ Nov 23rd, 2007 |
| Replies: 2 Views: 735 |
Forum: C++ Nov 13th, 2007 |
| Replies: 2 Views: 592 If you are using visual studio, the MSDN site has a complete reference to functions you will need. I suggest you get to know the MSDN site (it can be a bit tough to begin with). |
Forum: C++ Nov 9th, 2007 |
| Replies: 12 Views: 7,103 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 25th, 2007 |
| Replies: 7 Views: 718 You will only get help if we see some actual effort. Get coding. |
Forum: C++ Oct 15th, 2007 |
| Replies: 7 Views: 2,856 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,856 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,856 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... |
Forum: C++ Jul 20th, 2007 |
| Replies: 19 Views: 2,478 Forks are very unnecessary for most things not concerned with networking. Your post above is quite redundant, since I would assume you would fork if you wanted to try run prog1 & prog1 concurrently... |
Forum: C++ Jul 9th, 2007 |
| Replies: 19 Views: 2,478 Your questions are related to the fundamentals of forks. What are forks? Where are they used? Are they essential? These questions have been answered (yes from a C perspective), but that does not... |
Forum: C++ Jul 9th, 2007 |
| Replies: 19 Views: 2,478 Depends on what you are coding (Generally, I'd say no). Also, check the other forum. |
Forum: C++ Jul 8th, 2007 |
| Replies: 7 Views: 12,887 Sorry, I obviously misunderstood what you wanted. I could post some C examples, but considering this is the C++ forum and you said they look different, I'll only do it if you request it. Hopefully... |
Forum: C++ Jul 7th, 2007 |
| Replies: 9 Views: 2,103 Um... assuming you have written that code (which looks very neat), it seems odd you can't do some simple debugging. Do what "iamthewee" said. |
Forum: C++ Jul 7th, 2007 |
| Replies: 15 Views: 2,063 OH... C++, ok well I was thinking C here. I have noticed most C++ references don't use printf in their code. Anyway I was just saying printf, as it was stated in the thread title, and I guess it... |
Forum: C++ Jul 6th, 2007 |
| Replies: 6 Views: 5,726 What narue said applies. But I'll help you a little: isPrime(int x) |
Forum: C++ Jul 6th, 2007 |
| Replies: 7 Views: 12,887 Well I am no expert on forks either, but I have done a little with them in C (I assume principals will be the same with C++). So with a fork you spawn many process from a "parent". And so its use it... |
Forum: C++ Jul 6th, 2007 |
| Replies: 15 Views: 2,063 Even using printf, it should be an elementary solution. Just try understand how a for loop works (should be simple for this problem), and read up on printf and it's various options. The maths of this... |