🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Peter A. Buhr Thu, 18 Jan 1996 00:00
casting problem II
#6237
Author: Peter A. Buhr
Date: Thu, 18 Jan 1996 00:00
15 lines
759 bytes
Sorry, I had the wrong cast. Here is the corrected program. Sorry again.

int j(int,float) {}

int k(int,int) {}

int main() {
    int (*f)(int,float) = j;
    int x;
    float y;
    (int)y = x;			/* examples of casting on the left */
    (float)x = y;
    f = (int (*)(int,float))k;
    (int (*)(int,int))f = k;	/* now it works */
}
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