Forum: C++ Jul 20th, 2005 |
| Replies: 15 Views: 4,658 Actually, it's more efficient to check each answer as it goes, so only one loop is needed. Then again, that depends on the nature of grading one wants. I mean, you could do neat things like... |
Forum: C++ Jul 20th, 2005 |
| Replies: 15 Views: 4,658 To see it simpler this way in terms of schematics, here we are:
There are two phases in your program. The test-taking phase, and the test-grading phase. Both can be done in a loop, as you have 20... |
Forum: C++ Jul 14th, 2005 |
| Replies: 1 Views: 2,947 Any clean way to get from one to the other? erase() has been pretty vexing for me. |
Forum: Java Jul 14th, 2005 |
| Replies: 4 Views: 2,860 No fancy stuff needed... your for statement is just screwed up for second half.
for (lineCount = number; lineCount >= 0; lineCount --)
{
for (asteriskCount = lineCount; asteriskCount >= 0;... |
Forum: C++ Jul 14th, 2005 |
| Replies: 13 Views: 39,597 Wouldn't that trap high at 1 and low at 0? Perhaps 1, 1 are what you meant as starting vars. |
Forum: C++ Jul 13th, 2005 |
| Replies: 8 Views: 2,273 The thing, however, is that using namespace std; was already invoked in the code, so I didn't see the need to do it again - though it worked with the extra namespace declaration. >> was spaced out in... |
Forum: C++ Jul 13th, 2005 |
| Replies: 8 Views: 2,273 That's funny... that same syntax had DevC++ yelling at me for no ends yesterday, and yet it goes now. Is the std class identifier preceding the methods/templates that important? |
Forum: C++ Jul 13th, 2005 |
| Replies: 8 Views: 2,273 I was steered away from dimensional vectors before I could find out the syntax, so how would one create a vector of vectors? I found that trying to specify a vector as the type of the container... |
Forum: C++ Jul 13th, 2005 |
| Replies: 13 Views: 8,190 Use modulus (this operator gets the remainder of a / b) 16 repeatedly to get your digits. Use a while loop while dividing the given number by 16 after modulus (use ints, you want truncation) until... |
Forum: C++ Jul 13th, 2005 |
| Replies: 8 Views: 2,273 Now, in this particular one, I'm attempting to make a two-dimensional container that stores vectors. Of course, I wanted both dimensions to be dynamic at first, but once convinced that even... |