Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to pass parameters to H file?
#1
I am confused. What is the compiler trying to do?

I try to pass a parameter of type INT or Float and it keeps telling me that the conversion from type INT* to INT and from Float to Float* cannot be performed - what does this mean? Here is a sample code to QB64PE and below that the contents of the H file. It should be fine (but it would have to work) - what did I do wrong?

QB64 code:
Code: (Select All)
Declare Library "plus"
    Function calc_plus% (a As Integer, b As Integer)
End Declare

c% = calc_plus(5, 6)
Print c%

plus.h file code:
Code: (Select All)
int calc_plus (int a, int b)
{
    int c = a + b;
    return c;
}


I'm not big friends with the C language...


Reply


Messages In This Thread
how to pass parameters to H file? - by Petr - 04-11-2023, 03:30 PM
RE: how to pass parameters to H file? - by Jack - 04-11-2023, 03:50 PM
RE: how to pass parameters to H file? - by Jack - 04-11-2023, 03:54 PM
RE: how to pass parameters to H file? - by Petr - 04-11-2023, 04:59 PM
RE: how to pass parameters to H file? - by Jack - 04-11-2023, 05:09 PM
RE: how to pass parameters to H file? - by Jack - 04-11-2023, 05:17 PM
RE: how to pass parameters to H file? - by Petr - 04-11-2023, 05:31 PM



Users browsing this thread: 2 Guest(s)