getmaxx() and getmaxy() error

Jul 7, 2012 at 1:50pm
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 Jul 12, 2012 at 8:42am
Jul 7, 2012 at 3:23pm
Don't really have any good reply, but hopefully the link will help:

http://www.programmingsimplified.com/c/graphics.h/getmaxx
Jul 8, 2012 at 11:53am
is it compulsory to use initgraph() to use getmaxx()???
Jul 9, 2012 at 5:17pm
can't find anything at above link to solve my doubt.
any help??
Jul 11, 2012 at 8:00pm
?????????
Jul 11, 2012 at 8:24pm

@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 Jul 11, 2012 at 8:24pm
Topic archived. No new replies allowed.