| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Declaring a pointer to a |
Hello Neil!
Replying to a message of Neil Heller to Darin McBride:
DM>> I'll be getting the 2002 tax package in the next month or so.
DM>> Unfortunately, it only comes in Windows versions (so far).
DM>> my Fortunately, employer has graciously purchased a copy of VMWare
DM>> my for use, so I have WindowsXP installed under Linux.
NH> WinXP is really NT 5.1, so that must mean you have one OS running ON
NH> TOP of another. It seems to me as though that is quite a trick. Is
NH> this only possible with VMWare? Who makes VMWare?
Basically correct. I have one OS running "inside" another.
VMWare is not the only product that does this, but it is probably one of
the fastest. You can find it at www.vmware.com. But it's not cheap.
There is an open source virtual machine project underway somewhere on
www.sourceforge.net. It's free, it's probably close to stable, and, unlike
VMWare, you can emulate a PC on *any* hardware. This is because it fully
emulates the PC rather than virtualises it as VMWare does. Of course, this
necessarily makes it slower. But if all you have is a Mac, you can still
create a virtual PC and install Windows on it.
NH> C++ doesn't allow two functions to coexist if their only difference is
NH> the return type. Is this a hard-and-fast rule or are you familiar
NH> with a way around it. I would love to have:
NH> structA * ClassB::get();
NH> and
NH> structB * ClassB::get();
It's pretty hard-and-fast, although I seem to recall that someone had found
a way around it with templates. I'm not entirely sure if I was convinced
that the coolness of the feature was worth the headache of using that
paradigm...
The more realistic workaround is to write your code in a better way to begin with.
ErrorType ClassB::get(structA*& output);
ErrorType ClassB::get(structB*& output);
structA*
//structB*
foo_ptr;
if (classb_obj.get(foo_ptr) == et_NoError)
{
// got it.
}
Or something like this.
Darin
C_PLUSPLUS moderator
dmcbride{at}tower.to.org
---
* Origin: Tanktalus' Tower BBS (1:250/102)SEEN-BY: 633/267 270 @PATH: 250/102 99 10/345 379/1 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.