Forum: C++ Nov 30th, 2005 |
| Replies: 1 Views: 881 I'm working on a program where you find any path through a graph. When inputting the graph using an array, I found the number in position[0][8][9] gets set as 1 rather than 0 after position[0][9][1]... |
Forum: C++ Nov 7th, 2005 |
| Replies: 2 Views: 4,903 So you want random numbers with negative values... How do you get them? This is a simple method to do so. |
Forum: C++ Nov 2nd, 2005 |
| Replies: 7 Views: 3,070 In DOS, I'd consider issuing:
ctty lpt1
(Warning! This may be written incorrectly. It's been a while.)
Then, everything would print out at the printer connected to the parallel port. (Great... |
Forum: C++ Nov 2nd, 2005 |
| Replies: 3 Views: 1,348 cout << pointer;
That's what I use usually.
sSaverPtr -> data = filled;
Using a struct to form a linked list. |
Forum: C++ Oct 28th, 2005 |
| Replies: 7 Views: 2,313 |
Forum: C++ Oct 27th, 2005 |
| Replies: 1 Views: 1,703 I can't seem to figure out what your insert algorithm is. Can you explain it? I spent about 5 minutes looking at it and it's all a jumble.
A few comments:
--Make liberal use of comments. //... |
Forum: C++ Oct 27th, 2005 |
| Replies: 7 Views: 2,041 Algorithm efficiency is dependant upon eliminating fluff. For example, eliminate reducable fractions. (You've already tested it before... 1/3 ======= 2/6) |
Forum: C++ Oct 18th, 2005 |
| Replies: 8 Views: 1,328 I could, but I charge $1000 for each line of code I write for someone else.
I'll explain the structure so you can write it yourself:
for ({}variable{}, {}loop exit condition{},... |
Forum: C++ Oct 17th, 2005 |
| Replies: 8 Views: 1,328 You need to put your code in [ code ] [ /code ] tags.
I ran your code and see that it only outputs one letter for each entry. With a C-string (array of characters) you may have to write a for... |
Forum: C++ Oct 17th, 2005 |
| Replies: 3 Views: 3,245 I was not able to get this to work properly before the due date. For some reason the program sets the pointer to the linked list of numbers to null if I call the insert procedure with anything other... |
Forum: C++ Oct 15th, 2005 |
| Replies: 16 Views: 5,315 You could implement a stack, then pop each element off the top while at the same time pushing the element on to another stack. Then compare the results.
Naturally, there are much better ways to... |
Forum: C++ Oct 15th, 2005 |
| Replies: 6 Views: 1,422 At one level of abstraction, they're all random. At another level, none of them are.
You're going to have to help us out here. What do you need exactly? |
Forum: C++ Oct 15th, 2005 |
| Replies: 3 Views: 3,245 With the exception of string functions, use of the STL is not allowed in that class. |
Forum: C++ Oct 15th, 2005 |
| Replies: 3 Views: 3,245 I've got a program to do for a class I'm taking. I've got most the code written but I can't get the two classes to play together like I want them to.
Here is the relavent part of the assignment:... |
Forum: C++ Sep 12th, 2005 |
| Replies: 1 Views: 4,392 Hello,
I've been trying to write a program for a class I'm taking, and have gotten stuck on part of the assignment.
The program is to:
I have the class and template set up, as shown here:... |