🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.msdos.programmer
3 messages
3 total messages Started by dje Fri, 17 Jul 1998 00:00
Help! How to roundabout an interrupt to a method in TC++
#1483
Author: dje
Date: Fri, 17 Jul 1998 00:00
41 lines
2210 bytes
I want to build a class to use my Sound Blaster and it rest only one
problem:

class Sb
{  .....
   public:
   ....
   void interrupt dsp_int_sb16(__CPPARGS);
   void    DetectIRQ(void);
   ....
};

void interrupt Sb::dsp_int_sb16(__CPPARGS)
{
......
}

void Sb::DetectIRQ(void)
{ ....
  setvect(8+dsp_irq,&Sb::dsp_int_sb16);
  ....
}

The problem is on the setvect...
Error Machin.cpp 465 : Cannot convert 'void (interrupt Sb::*)(...)' to 'void
(interrupt *)(...)'
Error Machin.cpp 465 : Type mistach in parameter '__isr' in call to
'setvect(int,void (interrupt *)(...))'
i tryed with casts operators, but nothing goes...:-<<<
If you already had this problem or if you know how to resolve it, please can
you help me?
Thank you!

Delfosse J�r�me alias dje or [dje]
-------------------------------------------------------------------
http://users.skynet.be/dje - UIN=2068404
dje@skynet.be - dje_jay@hotmail.com - 2068404@pager.mirabilis.com
-------------------------------------------------------------------
1a rue du croquet
7540 Rumillies-Tournai Belgium
Tel.: +32 (0)69/23.39.90
Re: Help! How to roundabout an interrupt to a method in TC++
#1484
Author: Mike Sutton
Date: Fri, 17 Jul 1998 00:00
22 lines
1720 bytes
dje wrote:

> I want to build a class to use my Sound Blaster and it rest only one
> problem:
>
> [snip]
>
> The problem is on the setvect...
> Error Machin.cpp 465 : Cannot convert 'void (interrupt Sb::*)(...)' to 'void
> (interrupt *)(...)'
> please can you help me?
> Thank you!
>
> Delfosse J�r�me alias dje or [dje]
>

  The error message indicates that the compiler cannot convert a pointer to a
class member function into a pointer to a function.  You need to pass the
address of a C function instead of a C++ object member function.  Declare your
dsp_int_sb16() at file scope instead of within Sb.

-Mike Sutton
Re: Help! How to roundabout an interrupt to a method in TC++
#1485
Author: Aaron Orenstein
Date: Sat, 18 Jul 1998 00:00
35 lines
2172 bytes
You need to make dsp_int_sb16() static.
dsp_int_sb16() is currently a method of class Sb and therefore requires a
"this" pointer to call it.

dje wrote in message <6oo2vk$aqs$1@news1.skynet.be>...
 >class Sb
 >{  .....
 >   public:
 >   void interrupt dsp_int_sb16(__CPPARGS);
 >   void    DetectIRQ(void);
 >};
 >
 >The problem is on the setvect...
 >Error Machin.cpp 465 : Cannot convert 'void (interrupt Sb::*)(...)' to
 'void
 >(interrupt *)(...)'
 >Error Machin.cpp 465 : Type mistach in parameter '__isr' in call to
 >'setvect(int,void (interrupt *)(...))'
 >i tryed with casts operators, but nothing goes...:-<<<
 >If you already had this problem or if you know how to resolve it, please
 can
 >you help me?
 >Thank you!
 >
 >Delfosse J�r�me alias dje or [dje]
 >-------------------------------------------------------------------
 >http://users.skynet.be/dje - UIN=2068404
 >dje@skynet.be - dje_jay@hotmail.com - 2068404@pager.mirabilis.com
 >-------------------------------------------------------------------
 >1a rue du croquet
 >7540 Rumillies-Tournai Belgium
 >Tel.: +32 (0)69/23.39.90
>
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads