Some quick questions

Márcio Faustino m.faustino at no.spam.gmail.com
Wed Aug 8 15:13:31 PDT 2007


BCS wrote:
> The reason that doesn’t work is that the uses of union there is a type 
> deceleration, not a member declaration. So you get a struct without any 
> content.
> 
> (...)

How dumb of me :-| sorry.

Here's another question, given these 2 files:
// F1.d -------------------------
module F1;
import F2;

void f(int i, int j) {}
void main() { f(1); }

// F2.d -------------------------
module F2;

void f(int i) {}

Why does the compiler says:
function F1.f (int,int) does not match parameter types (int)
Error: expected 2 arguments, not 1

Looks like the import of F2 isn't working, because if I replace f(1) 
with F2.f(1), it works ok.

Thanks!


More information about the Digitalmars-d-learn mailing list