Forum: C++ Feb 11th, 2008 |
| Replies: 5 Views: 874 As it is only 3 lines of code do you need a function?
const int MAXROW = 4;
const int MAXCOL = 10;
int main()
{
int a [MAXROW][MAXCOL];
for (int row = 0; row < MAXROW; row++)
for... |
Forum: C++ Feb 9th, 2008 |
| Replies: 15 Views: 1,629 I had to do organic and inorganic chemistry to get a degree in computer science (and maths, physics, astronomy and philosophy).
At the time I thought it was dumb, but 20 years on, I don't regret... |
Forum: C++ Feb 9th, 2008 |
| Replies: 15 Views: 1,629 I am only new here, but is really surprising (and saddening) how many people just post up their assignments hoping someone else will do the ALL the work.
As an employer of IT graduates I get to... |
Forum: C++ Feb 7th, 2008 |
| Replies: 5 Views: 1,182 I don't think it is supported. A replacement might be fscanf() + some extra code, but it really depends on what you are doing with with vfscanf. |
Forum: C++ Jan 25th, 2008 |
| Replies: 4 Views: 1,158 Actually this is not true (http://msdn2.microsoft.com/en-us/library/s3f49ktz(VS.80).aspx) on most systems.
unsigned long, 4 bytes
0 to 4,294,967,295
unsigned int, (also) 4 bytes
0 to... |
Forum: C++ Jan 25th, 2008 |
| Replies: 8 Views: 2,271 The definition of the problem is not clear (at least to me).
Given the decimal integer, 523456
Is the answer
1) 3
Becuase there are 3 odd digits (5,3, & 5)
2) 2
Becuase there are 2 unique... |
Forum: C++ Jan 24th, 2008 |
| Replies: 2 Views: 1,451 Initialize uChoice
char uChoice = '\0';
Then add a loop. For example,
while (uChoice != 'Q') {
switch(uChoice)
...
...
} |
Forum: C++ Jan 24th, 2008 |
| Replies: 1 Views: 1,770 I've got some bad news for you. Your existing code isn't using linked lists at all. It is using an array!
Before you can delete from a linked list you need to actually create a linked list.
... |
Forum: C++ Jan 24th, 2008 |
| Replies: 8 Views: 3,869 If you have Visual Studio Team System (the expensive edition) then there is an excellent code profiler built into it.
The code profiler will tell you how long each and ever function in your... |
Forum: C++ Jan 24th, 2008 |
| Replies: 2 Views: 1,526 Try using a 'for' loop.
Also, as this *should* be a very small piece of code, there is no need to declare your own functions. It should look more like this,
#define ROLLS 4
#define DIESIDES 6... |
Forum: C++ Jan 23rd, 2008 |
| Replies: 1 Views: 2,499 You can use the Windows API function SetCommState to control the high level RTS/CTS control line behaviour in Windows.
Use EscapeCommFunction () to manually set RTS/CTS and GetCommModemStatus ()... |
Forum: C++ Jan 23rd, 2008 |
| Replies: 1 Views: 1,161 Just use use the built in C library QuickSort function (http://msdn2.microsoft.com/en-us/library/zes7xw0h(VS.71).aspx).
qsort (myArray, 10, sizeof (int), compare)
int compare ( const void... |