Forum: C++ Feb 28th, 2008 |
| Replies: 1 Views: 442 You'll get more help if you post your code, even if it isn't working yet.
I don't even have any suggestions because the first part of your post makes it appear that you will be reading from a... |
Forum: C++ Feb 28th, 2008 |
| Replies: 23 Views: 1,979 We have a policy of not doing people's homework for them.
However, here are a few pointers to get you on the right track:
1. Understand types. What is a void? What is a char? What is a... |
Forum: C++ Dec 13th, 2007 |
| Replies: 1 Views: 503 I'm sure you already know what the problem is, but here is the Display() code:
void Display(fstream &information)
{
int Stock;
cout << "Enter a Stock Number:";
cin >> Stock;
... |
Forum: C++ Dec 13th, 2007 |
| Replies: 3 Views: 670 The policy here is to not do people's homework for them, but instead to help people with their problems.
Did you make any changes to your program after my first set of hints? If so, post the new... |
Forum: C++ Dec 13th, 2007 |
| Replies: 3 Views: 670 Here are a few hints:
Let's refer to a 2 dimensional array as a matrix. Let's say that in your example the matrix has 15 rows and 3 columns.
When you want to loop through a 15 x 3 matrix, you... |
Forum: C++ Dec 10th, 2007 |
| Replies: 5 Views: 756 I built the code and got the random value 4. So the knight tried to move from [4,4] to [5,6] to [7,8]. Since the board is defined on [0-7,0-7], this move is off the board. Which is the bug with... |
Forum: C Nov 30th, 2007 |
| Replies: 1 Views: 644 I am making a bit of a guess here because you haven't posted all of your code, but I think you have declared something like:
char binary1[length1];
Then you copy the linked list into the char... |
Forum: C++ Nov 29th, 2007 |
| Replies: 9 Views: 1,564 The quick answer is that <cstring> is the C++ version of the old C header file string.h, while <string> is the std::string class from C++.
There is probably a long answer about the history of C... |
Forum: C++ Nov 29th, 2007 |
| Replies: 1 Views: 533 Just replace the i and j loops to call rand().
For example, in the multiplication loop change:
case 1:
for ( int i = 1; i <= 12; i++ )
... |
Forum: C++ Nov 29th, 2007 |
| Replies: 9 Views: 1,564 Use
#include <string>
instead of
#include <cstring> |
Forum: Cases, Fans and Power Supplies Nov 23rd, 2007 |
| Replies: 7 Views: 7,464 I don't have the same model VAIO that you do, but it does sound like you have a broken fan. The system probably has an override that shuts down when it gets too hot to prevent damage.
You can... |
Forum: C++ Nov 23rd, 2007 |
| Replies: 5 Views: 1,035 You've declared tempage to be an int. So when you multiple 2 * .1 (for example, if the person is 30) you are getting 0.2. When this is stored as an int, it is stored as 0.
You need to store the... |
Forum: Troubleshooting Dead Machines Nov 21st, 2007 |
| Replies: 9 Views: 6,603 The BIOS should have an option to restore defaults. You might want to give that a try. |
Forum: C++ Nov 20th, 2007 |
| Replies: 9 Views: 1,833 If you want specific help, you should post what you've already tried to do (i.e. code) and what error or bug you are encountering.
If it helps you to get started, strings in C/C++ are arrays of... |
Forum: C++ Nov 20th, 2007 |
| Replies: 5 Views: 4,667 In your first constructor you are using a function, strcpy() to copy the contents of one string to another. Which works great because strcpy() takes two strings as arguments.
In your second... |
Forum: C Nov 20th, 2007 |
| Replies: 2 Views: 771 You didn't post any code so I am assuming you are just interested in general help.
Check out string.h (they have a nice writeup on Wikipedia) which will give you some ideas about the kinds of... |
Forum: C Nov 20th, 2007 |
| Replies: 3 Views: 1,398 Here are a few tips to address the error you are seeing:
Understand that in C a string is an array of chars. So line and line2 are arrays of chars, and s and p are pointers to those arrays.... |
Forum: C Nov 19th, 2007 |
| Replies: 7 Views: 2,888 Read up on scanf and try to understand what it means to catch an argument.
I think if you change your scanf() line to:
scanf("%d", &n);
it will work for you. |
Forum: IT Professionals' Lounge Nov 18th, 2007 |
| Replies: 3 Views: 1,207 I don't have the same model you do (I have the PCG-TR3AP), but I recently took mine apart and I thought that three of the screws were pretty tricky. Hopefully they used the same tricks on your... |