<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>Muchas gracias por vuestra ayuda con los punteros. A ver si consigo verles la utilidad, pero, por ahora tengo otras dos dudas:</DIV>
<DIV> </DIV>
<DIV>Si en un programa yo hago "p* ++" no me incrementa el número que tiene la variable a la que apunto, si no que muestra números sin sentido. Sin embargo, si hago "++ *p" si que me funciona. ¿Por qué?</DIV>
<DIV> </DIV>
<DIV>¿Me podéis explicar esta parte del curso?:</DIV>
<DIV> </DIV>
<DIV><B><FONT face=Arial size=5>
<P align=left>Comparación entre punteros.</P></B></FONT><FONT face="Times New Roman" size=4>
<P align=left>Comparar punteros puede tener sentido en la misma situación en la que lo tiene restar</P>
<P align=left>punteros, es decir, averiguar posiciones relativas entre punteros que apunten a elementos</P>
<P align=left>del mismo array.</P>
<P align=left> </P>
<P align=left><FONT color=#ff0000>Hasta aquí entiendo</FONT></P>
<P align=left> </P>
<P align=left>Existe otra comparación que se realiza muy frecuente con los punteros. Para averiguar si</P>
<P align=left>estamos usando un puntero es corriente hacer la comparación:</P></FONT><FONT face="Courier New" color=#00009a size=4>
<P align=left>if(NULL != p)</P>
<P align=left> </P></FONT><FONT face="Times New Roman" size=4>
<P align=left>o simplemente</P></FONT><FONT face="Courier New" color=#00009a size=4>
<P align=left>if(p)</P>
<P align=left> </P></FONT><FONT face="Times New Roman" size=4>
<P align=left>Y también:</P></FONT><FONT face="Courier New" color=#00009a size=4>
<P align=left>if(NULL == p)</P>
<P align=left> </P></FONT><FONT face="Times New Roman" size=4>
<P align=left>O simplemente</P></FONT><FONT face="Courier New" color=#00009a size=4>
<P align=left>if(!p)</P>
<P align=left> </P>
<P align=left><FONT face="times new roman, new york, times, serif" color=#ff0000>Pero en esta parte no entiendo la utilidad de los 'if' ni para qué los usáis. ¿Me lo podéis explicar?</FONT></P>
<P align=left><FONT face="times new roman, new york, times, serif" color=#ff0000></FONT> </P>
<P align=left><FONT face="times new roman, new york, times, serif" color=#000000>Muchas gracias y un saludo, Alejandro.</FONT></P></FONT></DIV></div><br>
                <hr size=1><br><font face="Verdana" size="-2">LLama Gratis a cualquier PC del Mundo.<br>Llamadas a fijos y móviles desde 1 céntimo por minuto.<br><a href="http://us.rd.yahoo.com/mail/es/tagline/messenger/*http://es.voice.yahoo.com/">http://es.voice.yahoo.com</a></font></body></html>