putc


Description:

[ CCode ( cname = "fputc" , instance_pos = -1 ) ]
public int putc (char c)

Writes a character c to the given output stream stream.

Example: Write a char to the stream:

static int main () {
// Output: ``Could MacGyver use it to save the world?``
string str = "Could MacGyver use it to save the world?\n";
for (int i = 0; str[i] != '\0'; i++) {
stdout.putc (str[i]);
}
return 0;
}

valac --pkg glib-2.0 GLib.FileStream.putc.vala

Parameters:

c

character to be written

Returns:

c on success, GLib.FileStream.EOF on failure.