|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Bannato
Iscritto dal: Jul 2002
Città: Lucca
Messaggi: 966
|
[C++] funzione puts()
nn ho msdn a casa... qualcuno puo spiegarmi questa funzione e magari farmi un esempio pratico?
|
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Oct 2002
Città: Roma
Messaggi: 1502
|
Innanzitutto si trata di una funzione della libreria per l'I/O del C e non del C++; questa è la reference:
int puts (const char * string ); Output a string to stdout. Copies the string to standard output stream (stdout) and appends a new line character (\n). Parameters. string Null-terminated string to be outputed. Return Value. On success, a non-negative value is returned. On error EOF value is returned. Example. Codice:
/* puts example : hello world! */
#include <stdio.h>
int main ()
{
char string [] = "Hello world!";
puts (string);
}
__________________
Sun Certified Java Programmer EUCIP Core Level Certified European Certification of Informatics Professionals |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 18:06.



















