Compilers For C And C++ ?

Status
Not open for further replies.

clmlbx

Technomancer
OK GUYS, I just joined aptech for c & c++. now to complete my assignment i need a compiler .( which is light and of complete use ). I installed microsoft c++ express edition ..but how to use it ............u sudgest me good compiler or tell me how to use that c++ express edition from microsoft .
 
OP
clmlbx

clmlbx

Technomancer
#include <conio.h>
#include <stdio.h>
void main()
{
clrscr();
printf("asssignment 1");
getch();
}

is there any thing wrong in it ?

I am getting 3 errors
 

The_Devil_Himself

die blizzard die! D3?
which compiler?

Lemme guess the errors:
1.conio.h is not defined something
2.error about clrscr()
3.getch()

conio.h is not a part of standard ISO c\c++ standards.and both clrscr and getch are defined in conio.h.
 

QwertyManiac

Commander in Chief
Yeah just omit conio.h, clrscr(); and getch();

Code:
#include <stdio.h>
int main()
{
printf("asssignment 1");
}
 
OP
clmlbx

clmlbx

Technomancer
in dev c++

'main' must return int

In function `int main(...)':

`clrscr' undeclared (first use this function)
 
OP
clmlbx

clmlbx

Technomancer
ok that is working but for other programes

wont it make any problem

so conio.h will not work in dev c++

any other compiler
 
Last edited:

The_Devil_Himself

die blizzard die! D3?
^^was this code told to you by your teachers?Or you just made it yourself?Which book are you using?


forget this compiler ratting devc++ is very good.


Programming in standard c\c++
 

QwertyManiac

Commander in Chief
Sigh, get Turbo C++ from your college/school/windows_users_at_digit and go on, be a part of the unproductive coders.
 

The_Devil_Himself

die blizzard die! D3?
^^then tell your bloody teachers to teach you standard c\c++.OR just forget them all and learn yourself.

There are thousands of good tutorials available on net to get you started.
 

Pathik

Google Bot
@clmblx Ur teacher doesnt use dev c++ then .. :p
btw for the return error add a
return 0;
before the code ends..
 
OP
clmlbx

clmlbx

Technomancer
i remember he uses turbo c++

in turbo c++ errors are

include conio.h and stdio.h can not be open

unable to create .obj file
 
Last edited:

The_Devil_Himself

die blizzard die! D3?
turbo c++ was last launched in 1992!!! and c\c++ was standardized in 1998 iirc.

what aptech\your teachers are teaching you is not standars c\c++ which all the devs around the world use.


@errors in turbo c++:you have to specify the directry of header files in some setting iirc.Dude trust us and stop using turbo.
 
OP
clmlbx

clmlbx

Technomancer
any help or hint for

how to write programme for even and odd

greater in 3 numbers using switch
 

The_Devil_Himself

die blizzard die! D3?
^^lol.we can't teach you every program boy.Make good use of your net connection.

anyways how to check for even,odd:

let the no. to be tested is n,then if n%2==0 then the no. n is even otherwise not.

%=remiander,i.e. for e.g. 5%2=1,7%5=2,4%2=0.
'==' duble = means comparision.
 
OP
clmlbx

clmlbx

Technomancer
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)
 
Last edited:
Status
Not open for further replies.
Top Bottom