getmaxx() and getmaxy() error

1)I suppose that these functions return maximum x and y screen coordinates.
But when I used them they returned 0.

cout<<getmaxx()<<" "<<getmaxy();

0 0


2)I used textcolor(2) and textbackground(1) after these codes.But the output of above code(0 0) was printed in these settings.Is it like this only or problem?

3)Also is to possible to create a window with

window(1,1,0,0);

I used first time graphics.h for these functions.Knows a little or nothing about using graphics in c++.

Using Turbo c++ version 3.0
Last edited on
Don't really have any good reply, but hopefully the link will help:

http://www.programmingsimplified.com/c/graphics.h/getmaxx
is it compulsory to use initgraph() to use getmaxx()???
can't find anything at above link to solve my doubt.
any help??
?????????

@Akshit

is it compulsory to use initgraph() to use getmaxx()???


What is the problem? Try initgraph(). :)
I think it is the function that should be called in very beginning of a program before using a graphic mode.
Last edited on
Topic archived. No new replies allowed.