help with C programming, perror

i am trying to use the perror function:

something like

perror("WRONG!!!");

but when i see the message in the terminal, it comes out like

WRONG!!! : Success

How can i change it to

WRONG!!! : WRONG!!!

well i just want to have my own custom message for the part after the colon...

You can't. The second part of the message is derived from the current value of the "errno" variable. The strings come from message files or directly from libc and cannot be altered.

If you want a completely customized message, just use fprintf instead:

fprintf (stderr, "WRONG!!! : WRONG!!!\n");