From: Jonathan W. <jon...@gm...> - 2007-10-11 17:03:18
|
Hi, First, please be courteous and clear in your messages: Say hello, and ask for help, instead of just sending code and an error. Second, please indent your code, or many people will not even try to read it (plus it might make you find the problem!) int main(int argc, char *argv[]) { int i,j; //Dilwsi metavlitwn// i=1; //Arxikopoiisi metriti i// while ( i <= 5){ //Vrogxos epanalipsis// printf("\n"); for(j=1; j<=i; j++) printf(" %d ",i); //Emfanisi apotelesmatwn// i= i+1; //Ayksisi counter// } system("PAUSE"); return 0; } Third: comments don't need to end with a // (but it doesn't do any harm) You were probalby thinking of /* comment */, where comment can span multiple lines if you want Last, I'm sorry, it compiles just fine here, and runs with the following result: 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Press a key... Good luck, Jonathan On 10/11/07, Filippos Chiotis <fil...@gm...> wrote: > > So..this is my code for example > > > > #include <stdio.h> > #include <stdlib.h> > > int main(int argc, char *argv[]) > { > int i,j; //Dilwsi metavlitwn// > i=1; //Arxikopoiisi metriti i// > while ( i <= 5){ //Vrogxos epanalipsis// > printf("\n"); > for(j=1; j<=i; j++) > > printf(" %d ",i); //Emfanisi apotelesmatwn// > > i= i+1; //Ayksisi counter// > } > system("PAUSE"); > return 0; > } > and this is the result > C:\Dev-Cpp\Makefile.win [Build Error] [main.o] Error 1 > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > -- <Morpheus> linux, c'est une question de VI ou de MORE |