Forum: Geeks' Lounge Feb 12th, 2005 |
| Replies: 13 Views: 4,958 Odd that when there was an anti-woman joke in this very forum, I was trounced on for saying that it was inappropriate. Christian, you and I are in a different space than most, I fear. |
Forum: C++ Feb 10th, 2005 |
| Replies: 5 Views: 27,268 This is sort of a side issue, but I tend to prefer a static method of Foo being the factory, rather than have a seperate class called, in this case, FooFactory. So, the base class would implement
... |
Forum: C++ Feb 10th, 2005 |
| Replies: 3 Views: 4,134 An escape sequence is something like '\n' for newline or '\t' for tab. An 'illegal' escape sequence is one that the compiler has no idea what to do with, like '\k' or something. That can show up if... |
Forum: Computer Science Feb 10th, 2005 |
| Replies: 12 Views: 4,699 Oh, I take that back, it was not a stored-program computer but then neither, apparently, was ENIAC. They both apparently used wires and switches. |
Forum: Computer Science Feb 10th, 2005 |
| Replies: 12 Views: 4,699 That was the first AMERICAN computer, but the English claim to have an earlier WWII stored-program computer that was a code breaker and therefore "secret". It was called "Colossus" and has been... |
Forum: Legacy and Other Languages Feb 10th, 2005 |
| Replies: 90 Views: 28,722 DOS Batch files (and Windows Command prompt files):
echo Hello World!
The C++ compiler itself (well, SOME compilers like VC):
#pragma message( "Hello, World!" ) |
Forum: Computer Science Feb 6th, 2005 |
| Replies: 6 Views: 7,708 Ya, it is a serious investment in time. PPC is easier because it is "mostly Windows" and you can use wizzards and samples to get most of the way to where you want to go. |
Forum: Computer Science Feb 6th, 2005 |
| Replies: 6 Views: 7,708 Which phone OS are you targeting? Symbian? PPC? Palm? Something else? If you are just going to use a 'plain old phone' you will have to see what kinds of development kits you can get for them;... |
Forum: C++ Feb 4th, 2005 |
| Replies: 3 Views: 9,506 You might try Google.
'rand' returns an int value in some range. On MSVC it returns a number between 0 and 0x7FFF (32767).
Each time you call it, it returns a different number in a sequence... |
Forum: C++ Feb 3rd, 2005 |
| Replies: 3 Views: 24,587 If it were me, I'd use sprintf() or one of its variants (_snprintf, say).
char display[30];
_snprintf( display, sizeof(display), "%.2f", empMoney );
And forget about scaleing it manually. |
Forum: C++ Feb 2nd, 2005 |
| Replies: 5 Views: 2,870 And GetTickCount() should be something like (depending on the system) the number of 'ticks' since the machine booted. On Windows it it milliseconds since boot, and wraps around every month or two... |
Forum: Computer Science Feb 2nd, 2005 |
| Replies: 20 Views: 8,596 And is DNA just the storage module for a biologic computer? Let's see, what cells do I need over HERE? Well, consult my handy dandy DNA strand.... SKIN! |
Forum: C Feb 2nd, 2005 |
| Replies: 8 Views: 3,812 It's no bother at all, but you are right I don't understand what you are attempting. It sounds like you are doing something to these 5 copies and then seeing if doing something to them didn't change... |
Forum: C++ Feb 2nd, 2005 |
| Replies: 4 Views: 3,407 No need, just rename one of the mains to be something else. |
Forum: C Feb 1st, 2005 |
| Replies: 8 Views: 3,812 You could just say....
if (mask_bit == 1)
result = original;
else
resilt = altered_pixel;
Becuase if the mask is one bit and the pixel is 8 bits you'd have to do some fussing with stuff to... |
Forum: C++ Feb 1st, 2005 |
| Replies: 4 Views: 3,407 you have two functions with the name 'main', one in each file. Only one function 'main' can exist in the program. Change one of them.
And, as Naru will tell you if I don't, it should be "int... |
Forum: C Feb 1st, 2005 |
| Replies: 8 Views: 3,812 So you have pixels represented as some number of shades of gray. And you want to AND them with something? Why AND? Is this some sort of mask where all ON (black? white?) is a mask to include the... |
Forum: Computer Science Jan 31st, 2005 |
| Replies: 12 Views: 4,699 Later in 1941, after an unfortunately-placed resistor supplied the incorrect voltage to a circuit, the first 'bug' was invented.
By January, 2005 the number of bugs in shipping software exceeds... |
Forum: C Jan 29th, 2005 |
| Replies: 8 Views: 13,124 you could, for example, use printf or sprintf or its ilk. Take a look at the specifications for the strings. You can control right or left justification, leading zeros, number of digits after the... |
Forum: C Jan 29th, 2005 |
| Replies: 3 Views: 2,251 You want to print this bill on a printer or on disk? On which OS? Are you using MFC, which has extensive printer support built in? Is you app a windowing app or a console app (I assume a windowing... |
Forum: C++ Jan 27th, 2005 |
| Replies: 16 Views: 13,779 It would be odd to change after a system reset. Structures are often padded to fit the alignment you specified somewhere (or the default). So
struct
{
char a;
int b;
} foo;
If the... |
Forum: Upcoming News Stories Jan 27th, 2005 |
| Replies: 3 Views: 7,961 On a slightly different but related issue is the creative spirit in general. Industry is keen to compare software engineering (ha, even the term is an oxymoron) to industries like construction. ... |
Forum: Upcoming News Stories Jan 27th, 2005 |
| Replies: 3 Views: 2,812 Before I saw some of the Studio Ghibli stuff, I too thought Japanese anime was just cheap crap. for one thing, the poor English-speaking actors have to talk so fast there's no time for even... |
Forum: C Jan 27th, 2005 |
| Replies: 4 Views: 3,531 Dave beat me by one minute! Rats! :-)
Ah, well, great minds..... |
Forum: C++ Jan 27th, 2005 |
| Replies: 16 Views: 13,779 Naru, was this intentional?
array[i].name[ i ];
shouldn't it be just
array[i].name;
?
Same with array[i].cardtype[ i ]; it should be array[i].cardtype; I think. |
Forum: C Jan 27th, 2005 |
| Replies: 4 Views: 3,531 how about:
char filename[ 256 ]; // or MAX_PATH or whatever
...
sprintf( filename, "%d.txt", i ); // now filename will be 1.txt, 2.txt, whatever.
and run the loop from 1 to < 6 or 1 to <= 5,... |
Forum: Viruses, Spyware and other Nasties Jan 26th, 2005 |
| Replies: 11 Views: 3,172 Since I have DSL, I use a hardware firewall/router to protect all the machines at home. They're dirt cheap these days. |
Forum: C Jan 24th, 2005 |
| Replies: 6 Views: 30,385 Here is your culpret:
beg=a[0];
end=a[9];
beg should be the bottom of the range to search, in this case 0.
end should be the top of the range to search, in this case n (not 9).
You are... |
Forum: C++ Jan 24th, 2005 |
| Replies: 3 Views: 10,479 " if (*this == rhs)"
is testing the CONTENTS of the two objects (maybe using an operator); so they may not be the same actuall class, but may contain the same thing. For operator = that is not... |
Forum: C++ Jan 24th, 2005 |
| Replies: 21 Views: 5,903 What is the question? How to pass the pointers without using globals?
in your main you would have, say,
int numberOfPlayers;
int at_bats, singles, doubles, triples, homers;
Then you can... |
Forum: C++ Jan 23rd, 2005 |
| Replies: 3 Views: 2,391 your implementation of int size() has no class before it; it should be
int IntArray::size()
and int IntArray::&operator [] ( int i ) const
does not exist in your class definition (instead... |
Forum: C Jan 23rd, 2005 |
| Replies: 5 Views: 2,105 As Dave says, you won't convince any legitemate system to allow:
free("ERROR");
the equivelent of which you are doing by returning a pointer to "ERROR".
It generally works to return NULL if... |
Forum: C++ Jan 21st, 2005 |
| Replies: 1 Views: 2,046 Please post the relevent code and tell us what the compile errors ARE. |
Forum: C++ Jan 19th, 2005 |
| Replies: 28 Views: 42,672 keep accessing array elements from 0 until the program segfaults, then back up one and that's your limit. |
Forum: Computer Science Jan 19th, 2005 |
| Replies: 14 Views: 4,940 There are several real-time, DOS-like operating systems available, such as RTOS:
http://www.smxinfo.com/index.html
These support modern disks and such, perhaps they could be a solution. ... |
Forum: IT Professionals' Lounge Jan 17th, 2005 |
| Replies: 16 Views: 6,332 Thanks for all the replies, and I'm thrilled someone else has seen them!
Ya, I suppose I should move out of the '80s and use a different browser. If it redeems me any, my iBook is running Safari,... |
Forum: IT Professionals' Lounge Jan 17th, 2005 |
| Replies: 16 Views: 6,332 Ok, I installed the spyware beta, and did a full scan. It's a cool program, by the way, that gives you unprecedented abilities to control startup processes and the like!
The scan found two things... |
Forum: IT Professionals' Lounge Jan 17th, 2005 |
| Replies: 16 Views: 6,332 Well, I only ever see it on this site, and it only started happening recently. I have the Symantec AntiVirus Corporate Edition, and a hardware firewall. Here's the URL....
... |
Forum: IT Professionals' Lounge Jan 16th, 2005 |
| Replies: 16 Views: 6,332 On almost every page I visit on this site, every time I visit a page on this site, there is a popup asking if I want to take a survey from one of the sponsors.
Fortunately I have the Google... |
Forum: IT Professionals' Lounge Jan 16th, 2005 |
| Replies: 1 Views: 12,809 Those names sound like virus'. I'd scan them. Also, see if you can find them on your drive and rename them to some temporary name to see if that helps. One way to find recently added virus files... |