🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Mourad or Rosalinda Ettaki Mon, 01 Mar 1999 00:00
Casting
#164
Author: Mourad or Rosalinda Ettaki
Date: Mon, 01 Mar 1999 00:00
15 lines
887 bytes
Could someone tell me why this compiles:

main()
{
    int X;

    trythis((bool &)X);                // compiles !!!!!
    trythis((bool)X);                    // doesn't compile !!!!!
}

void trythis(bool& X)
{
}

Thanks!
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