Compilers For C And C++ ?

Status
Not open for further replies.

mehulved

18 Till I Die............
QwertyManiac said:
Yeah just omit conio.h, clrscr(); and getch();

Code:
#include <stdio.h>
int main()
{
printf("asssignment 1");
}
Shouldn't it be returning an int?
I believe you should either add
Code:
return 0
or
Code:
main
instead of int main.
Though this won't give an error but I believe it should give warning if you pass -Wall parameter to gcc.

Didn't I warn of the morons at aptech? Forget aptech they will teach you just crap.
 
Last edited:

Yamaraj

The Lord of Death
Code:
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
    (void) printf("asssignment 1");

    return EXIT_SUCCESS;
}
This code conforms to the ANSI/ISO C standards, and can withstand all syntax checker programs (lint), as well as -Wall -ansi -pedantic parameters to the GCC C compiler.
 
OP
clmlbx

clmlbx

Technomancer
^^^ I got the solution .. It was directory errors. directories were not defined correctly

thanx
 

anand1

In the zone
Yes go for DevC++ i have been using it and never had any problem. It is light and eats up less memory.
 

nileshgr

Wise Old Owl
you want clear screen. use the following code:

Code:
#include <stdio.h>
#include <stdlib.h>

void clrscr()
{
system("clear");
}

int main()
{
clrscr();
printf("asssignment 1\n\n");
}

I have tried this using g++ but i can't guarantee that it will work on Windows. :)
 

khattam_

Fresh Stock Since 2005
i knew how to do it but i was little confused ..

hey any one know why i am getting that errors in turbo c++

(post no. 16)

turbo c++ shows error details... on compiling..... Ctrl+F9

like this:
*geocities.com/khattam_khattam/tcerr1.jpg

and when you press enter, it shows:
*geocities.com/khattam_khattam/tcerr2.jpg

post the details here, if you cant figure out urself......
 

j1n M@tt

Cyborg Agent
Use Broland 32-bit C++ Compiler......its free,light on resource,easy to understand and best suited for C/C++ project works......all of our group's works(Centium inc.) r done on this IDE.
 

nileshgr

Wise Old Owl
@the question asker,
if you can't spare clear screen which is included in conio.h then

include stdlib.h && instead of clrscr(); use system("clear");

:)
 
Status
Not open for further replies.
Top Bottom