>>> Part 1 of 2...
::To: All From: Fernando Ariel Gont (4:90 Subj: Puff! (Cuantas preguntas)
::
----------------------
FAG(>
FAG(> To.......... All
FAG(> Hola, All !
FAG(> Miren, empec a aprender C++ (estoy leyendo un libro de Bruce Eckelt)
FAG(> y ten- go mil dudas...... Empecemos:
FAG(> No entiendo muy bien la diferencia entre "declarar" y "definir" una
FAG(> funci n (o una variable).....
FAG(> (Lo que yo entiendo es que: "definir una funci n" es escribir el
FAG(> algoritmo que realiza la funci n; y "declararla" es ejecutar dicha
FAG(> funci n)
I'm sorry, but I don't understand Spanish, (if it's not Spanish, I
don't speak that language, either) but I think you're asking about
the difference between a function "definition" and "declaration,"
right? A function declaration only tells the name of the function,
the type it returns, and the types of arguments it recieves but the
definition is how the function is actually written. For example,
int add(int, int);
is a declaration (or "prototype") and
int add (int i, int j)
{
return (i + j);
}
is the definition.
Did you also ask the difference between *variable* "definitions" and
"declarations?" If so, the declaration tells the compiler what type
of variable it is and the definition actually sets aside memory for
that variable. with variables, both are usually done at the same
time, but not always. For example,
struct complex
{
float re, im;
};
is a definition but not a declaration because it doesn't set aside
any memory for a complex and
complex Cx1;
is a declaration because it sets aside memory for a complex variable.
They can both be done at the same time like so:
struct complex
{
float re, im;
} Cx1;
FAG(> En el libro dice que pueden haber errores segun el orden en que se le
FAG(> den los nombres de los archivos al LINK.. Esto es as ?
FAG(> Que son los (o el) "streams class" ?
FAG(> Una "class" es una librer a?
A "class" builds on the idea of a "struct" by adding functions so
your user-defined types can take care of themselves. (I'd suggest
that you read a book on "Object Oriented Programming" for more
details.) The stream class is a stream of data (usually chars) going
from one one place to another, such as from the keyboard to memory or
from the memory to the screen.
FAG(> Para que sirve el operador "<<" ?
>>> Continued to next message...
---
Blue Wave/386 v2.30 [NR]
--- WWIVToss v.1.38b Registered
---------------
* Origin: Faith keeps collapsin' on my head... (1:271/150.0)
|