<div>In program era deja printf(">").</div> <div>Am scris gresit aici.<BR><BR><B><I>Daniel Baluta <daniel.baluta@gmail.com></I></B> wrote:</div> <BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid" class=replbq><BR><BR> <DIV class=gmail_quote>2008/4/3 Sorin <<A href="mailto:sorin19840@yahoo.com">sorin19840@yahoo.com</A>>:<BR> <BLOCKQUOTE style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid" class=gmail_quote> <DIV>La Tema 1 SO - mini-shell, considerand urmatorul cod:</DIV> <DIV>char comanda[100];</DIV> <DIV>void main()<BR>{<BR>while (1)<BR>{ </DIV></BLOCKQUOTE> <BLOCKQUOTE style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid" class=gmail_quote> <DIV><BR>printf("\");</DIV></BLOCKQUOTE> <DIV><BR>aici sigur e asa ? </DIV> <BLOCKQUOTE style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"
class=gmail_quote> <DIV><BR>gets(comanda)<BR>// parsare + executa(comanda);<BR>if (strncmp(comanda,"exit",4)==0)) break;<BR>if (strncmp(comanda,"quit",4)==0)) break;<BR>}</DIV> <DIV>La rularea interactiva, nu e nici o problema, dar <BR>daca ai intr-un fisier test.txt de exemplu</DIV> <DIV>comanda1<BR>comanda2<BR>comanda3<BR>exit</DIV> <DIV>in loc sa afiseze;</DIV> <DIV>>comanda1<BR>output comanda1<BR>>comanda2<BR>output comanda2<BR>>comanda3<BR>output comanda3</DIV> <DIV>afiseaza:</DIV> <DIV>>comanda1<BR>output comanda1<BR>comanda2<BR>output comanda2<BR>comanda3<BR>output comanda3<BR>>></DIV> <DIV>( linia > de prompt nu o pune inaintea comenzii, ci le pune pe toate la sfarsit )</DIV> <DIV>Din cauza asta, programul nu trece nici un test pe site.<BR>Ai o idee/solutie?</DIV> <DIV>PS: N-am folosit parserul de pe site. Nu pot folosi pointer si getline.</DIV></BLOCKQUOTE> <DIV><BR></DIV> <BLOCKQUOTE style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt
0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid" class=gmail_quote> <DIV></DIV> <div></div> <HR SIZE=1> You rock. That's why Blockbuster's offering you <A href="http://us.rd.yahoo.com/evt=47523/*http://tc.deals.yahoo.com/tc/blockbuster/text5.com" target=_blank>one month of Blockbuster Total Access</A>, No Cost.<BR>_______________________________________________<BR>so mailing list<BR><A href="mailto:so@cursuri.cs.pub.ro">so@cursuri.cs.pub.ro</A><BR><A href="http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so" target=_blank>http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so</A><BR><BR></BLOCKQUOTE></DIV>_______________________________________________<BR>so mailing list<BR>so@cursuri.cs.pub.ro<BR>http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so<BR></BLOCKQUOTE><BR><p> 
<hr size=1>You rock. That's why Blockbuster's offering you <a href="http://us.rd.yahoo.com/evt=47523/*http://tc.deals.yahoo.com/tc/blockbuster/text5.com">one month of Blockbuster Total Access</a>, No Cost.