<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>Ah vale, ahora lo entiendo.</DIV>
<DIV> </DIV>
<DIV>theCat es un objeto que se instancia en la función main, y puede ser como
nombre theCat mismamente y/o otro nombre.</DIV>
<DIV> </DIV>
<DIV>SimpleCat migato;</DIV>
<DIV>FunctionOne(migato);</DIV>
<DIV> </DIV>
<DIV>Y retorna mismo tipo de retorno, SimpleCat.</DIV>
<DIV> </DIV>
<DIV>Ayer no lo veía tan claro a pesar de ser sencillo ahora.</DIV>
<DIV> </DIV>
<DIV>¡Muchas gracias Pablo!</DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=pablusplus@gmail.com
href="mailto:pablusplus@gmail.com">Pablo Alejandro Herrero</A> </DIV>
<DIV><B>Sent:</B> Thursday, August 02, 2012 5:22 AM</DIV>
<DIV><B>To:</B> <A title=cconclase@listas.conclase.net
href="mailto:cconclase@listas.conclase.net">Lista de correo sobre C y C++</A>
</DIV>
<DIV><B>Subject:</B> Re: [C con Clase]Problema con interpretación de código
relaccionado con clases.</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV style="FONT-FAMILY: calibri; COLOR: rgb(34,34,34); FONT-SIZE: 16px"><FONT
face="Microsoft Sans Serif"><SPAN
style="BACKGROUND-COLOR: rgb(255,255,255)">Para ser breve...</SPAN></FONT></DIV>
<DIV style="FONT-FAMILY: calibri; COLOR: rgb(34,34,34); FONT-SIZE: 16px"><FONT
face="Microsoft Sans Serif"><SPAN
style="BACKGROUND-COLOR: rgb(255,255,255)"><BR></SPAN></FONT></DIV>
<DIV style="COLOR: rgb(34,34,34)"><FONT face="Microsoft Sans Serif"><SPAN
style="BACKGROUND-COLOR: rgb(51,255,51)">tipo_de_retorno</SPAN>
<SPAN
style="BACKGROUND-COLOR: rgb(153,153,255)">nombre_de_la_funcion</SPAN>
(<SPAN style="BACKGROUND-COLOR: rgb(102,255,255)">tipo_del_argumento
argumento</SPAN>)</FONT></DIV>
<DIV style="COLOR: rgb(34,34,34)"><FONT
face="Microsoft Sans Serif"><BR></FONT></DIV>
<DIV style="COLOR: rgb(34,34,34)"><FONT face="Microsoft Sans Serif">cada objeto
declarado en c/c++ tiene un tipo. Ya sea el retorno de una funcion como sus
argumentos.</FONT></DIV>
<DIV style="COLOR: rgb(34,34,34)"><FONT face="Microsoft Sans Serif">Lo que
señalas es la declaración de dos funciones, de nombres FunctionOne y FunctionTwo
las cuales admiten por argumento un objeto de clase SimpleCat -FunctionOne- y un
puntero a objeto de clase SimpleCat -FunctionTwo- y a su vez devuelven como
retorno un objeto de clase SimpleCat y un puntero a un objeto de clase SimpleCat
respectivamente.</FONT></DIV>
<DIV style="FONT-FAMILY: calibri; COLOR: rgb(34,34,34); FONT-SIZE: 16px"><FONT
face="Microsoft Sans Serif"><SPAN
style="BACKGROUND-COLOR: rgb(255,255,255)"><BR></SPAN></FONT></DIV>
<DIV style="FONT-FAMILY: calibri; COLOR: rgb(34,34,34); FONT-SIZE: 16px"><FONT
face="Microsoft Sans Serif"><SPAN
style="BACKGROUND-COLOR: rgb(255,255,255)"><BR></SPAN></FONT></DIV>
<DIV style="FONT-FAMILY: calibri; COLOR: rgb(34,34,34); FONT-SIZE: 16px"><FONT
face="Microsoft Sans Serif"><SPAN
style="BACKGROUND-COLOR: rgb(255,255,255)">>> </SPAN><SPAN
style="BACKGROUND-COLOR: rgb(51,255,51)">SimpleCat</SPAN><SPAN
style="BACKGROUND-COLOR: rgb(255,255,255)"> </SPAN><SPAN
style="BACKGROUND-COLOR: rgb(153,153,255)">FunctionOne</SPAN><SPAN
style="BACKGROUND-COLOR: rgb(255,255,255)">(</SPAN><SPAN
style="BACKGROUND-COLOR: rgb(102,255,255)">SimpleCat theCat</SPAN><SPAN
style="BACKGROUND-COLOR: rgb(255,255,255)">);</SPAN></FONT></DIV>
<DIV
style="BACKGROUND-COLOR: rgb(255,255,255); FONT-FAMILY: calibri; COLOR: rgb(34,34,34); FONT-SIZE: 16px"><SPAN
style="FONT-FAMILY: 'Microsoft Sans Serif'; FONT-SIZE: small">>>
</SPAN><SPAN
style="BACKGROUND-COLOR: rgb(51,255,51); FONT-FAMILY: 'Microsoft Sans Serif'; FONT-SIZE: small">SimpleCat*</SPAN><SPAN
style="FONT-FAMILY: 'Microsoft Sans Serif'; FONT-SIZE: small"> </SPAN><SPAN
style="BACKGROUND-COLOR: rgb(153,153,255); FONT-FAMILY: 'Microsoft Sans Serif'; FONT-SIZE: small">FunctionTwo</SPAN><SPAN
style="FONT-FAMILY: 'Microsoft Sans Serif'; FONT-SIZE: small">(</SPAN><SPAN
style="BACKGROUND-COLOR: rgb(102,255,255); FONT-FAMILY: 'Microsoft Sans Serif'; FONT-SIZE: small">SimpleCat
*theCat</SPAN><SPAN
style="FONT-FAMILY: 'Microsoft Sans Serif'; FONT-SIZE: small">);</SPAN></DIV>
<DIV> </DIV>
<DIV class=gmail_quote>El 1 de agosto de 2012 21:27, Oscar <SPAN dir=ltr><<A
href="mailto:pelucheloko@hotmail.com"
target=_blank>pelucheloko@hotmail.com</A>></SPAN> escribió:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; FONT-SIZE: 12pt">
<DIV>Hola que tal.</DIV>
<DIV> </DIV>
<DIV>Tengo el siguiente código el cual me crea una confusión alarmante en las
líneas que marcaré a su empieze con >></DIV>
<DIV> </DIV>
<DIV>Sé que es una función lo que se declara, pero no entiendo los parámetros
de entrada a esta.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV style="FONT-FAMILY: 'Calibri'; FONT-SIZE: 12pt">
<DIV><FONT face="Microsoft Sans Serif">#include <iostream></FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> </FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">class SimpleCat</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">{</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">public:</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">
SimpleCat();
// constructor</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">
SimpleCat(SimpleCat&); // copy
constructor</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">
~SimpleCat();
// destructor</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">};</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> </FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">SimpleCat::SimpleCat()</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">{</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> std::cout <<
"Simple Cat Constructor ...\n";</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">}</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> </FONT></DIV>
<DIV><FONT
face="Microsoft Sans Serif">SimpleCat::SimpleCat(SimpleCat&)</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">{</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> std::cout <<
"Simple Cat Copy Constructor ...\n";</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">}</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> </FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">SimpleCat::~SimpleCat()</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">{</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> std::cout <<
"Simple Cat Destructor ...\n";</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">}</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> </FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">>> SimpleCat
FunctionOne(SimpleCat theCat);</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">>> SimpleCat*
FunctionTwo(SimpleCat *theCat);</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> </FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">int main()</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">{</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> std::cout <<
"Making a cat ...\n";</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> SimpleCat
Frisky;</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> std::cout <<
"Calling FunctionOne ...\n";</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">
FunctionOne(Frisky);</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> std::cout <<
"Calling FunctionTwo ...\n";</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">
FunctionTwo(&Frisky);</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> return
0;</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">}</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> </FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">// FunctionOne, passes by
value</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">SimpleCat FunctionOne(SimpleCat
theCat)</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">{</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> std::cout <<
"Function One. Returning ...\n";</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> return
theCat;</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">}</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> </FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">// functionTwo, passes by
reference</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">SimpleCat* FunctionTwo (SimpleCat
*theCat)</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">{</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> std::cout <<
"Function Two. Returning ...\n";</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif"> return theCat;
</FONT></DIV>
<DIV><FONT face="Microsoft Sans Serif">}</FONT></DIV>
<P style="MARGIN-BOTTOM: 0cm">Haber si me pueden iluminar un poco por
favor.</P>
<P style="MARGIN-BOTTOM: 0cm">Muchas gracias.</P>
<P style="MARGIN-BOTTOM: 0cm"><BR><FONT color=#548dd4><FONT
face="Arial, sans-serif"><I><B>Oscar Aparicio
Holgado</B></I></FONT></FONT><BR><FONT color=#e36c09><FONT
face="Tahoma, sans-serif">Administrador de
sistemas.</FONT></FONT></P></DIV></DIV></DIV></DIV><BR>_______________________________________________<BR>Lista
de correo Cconclase <A
href="mailto:Cconclase@listas.conclase.net">Cconclase@listas.conclase.net</A><BR><A
href="http://listas.conclase.net/mailman/listinfo/cconclase_listas.conclase.net"
target=_blank>http://listas.conclase.net/mailman/listinfo/cconclase_listas.conclase.net</A><BR>Bajas:
<A href="http://listas.conclase.net/index.php?gid=2&mnu=FAQ"
target=_blank>http://listas.conclase.net/index.php?gid=2&mnu=FAQ</A><BR></BLOCKQUOTE></DIV><BR>
<P>
<HR>
_______________________________________________<BR>Lista de correo Cconclase
Cconclase@listas.conclase.net<BR>http://listas.conclase.net/mailman/listinfo/cconclase_listas.conclase.net<BR>Bajas:
http://listas.conclase.net/index.php?gid=2&mnu=FAQ</DIV></DIV></DIV></BODY></HTML>