C++ School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a C++ Expert!

Join 300,329 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,842 people online right now. Registration is fast and FREE... Join Now!




graphics

 

graphics

Rating  3
Syed Faraz

9 Apr, 2009 - 11:46 AM
Post #1

New D.I.C Head
*

Joined: 9 Apr, 2009
Posts: 8


My Contributions
Anybody answer me............. :
why am i having problems in using a headerfile for graphic initialization, what is an appropriate choice???
blink.gif


User is offlineProfile CardPM
+Quote Post


chris772

RE: Graphics

9 Apr, 2009 - 11:58 AM
Post #2

D.I.C Head
**

Joined: 13 Mar, 2009
Posts: 166



Thanked: 2 times
My Contributions
1) Post your code
2) Post your header file's code (and name)
3) Tell us what your exact error/problem is
4) Ask for help in a way that lets us actually do something about your problem.
User is offlineProfile CardPM
+Quote Post

Syed Faraz

RE: Graphics

10 Apr, 2009 - 11:16 PM
Post #3

New D.I.C Head
*

Joined: 9 Apr, 2009
Posts: 8


My Contributions
QUOTE(chris772 @ 9 Apr, 2009 - 11:58 AM) *

1) Post your code
2) Post your header file's code (and name)
3) Tell us what your exact error/problem is
4) Ask for help in a way that lets us actually do something about your problem.



my compiler could not find the msoftcon.h

User is offlineProfile CardPM
+Quote Post

janotte

RE: Graphics

11 Apr, 2009 - 03:44 AM
Post #4

code > sword
Group Icon

Joined: 28 Sep, 2006
Posts: 2,157



Thanked: 152 times
Expert In: C/C++

My Contributions
QUOTE(Syed Faraz @ 10 Apr, 2009 - 11:16 PM) *

my compiler could not find the msoftcon.h


Unless you are prepared to provide us information we can't help you.

What compiler?
What is the exact error message.
Are you going to show us the code or what?

If you aren't going to help us help you expect very little response to your postings.

User is offlineProfile CardPM
+Quote Post

Syed Faraz

RE: Graphics

12 Apr, 2009 - 11:31 PM
Post #5

New D.I.C Head
*

Joined: 9 Apr, 2009
Posts: 8


My Contributions
QUOTE(janotte @ 11 Apr, 2009 - 03:44 AM) *

QUOTE(Syed Faraz @ 10 Apr, 2009 - 11:16 PM) *

my compiler could not find the msoftcon.h


Unless you are prepared to provide us information we can't help you.

What compiler?
What is the exact error message.
Are you going to show us the code or what?

If you aren't going to help us help you expect very little response to your postings.


There is a sample:

#include<constream.h>
#include<msoftcon.h>

struct circle
{
int xco, yco;
int rad;
color fillcolor;
fstyle fillstyle;
};

void circ_draw(circle c)
{
set_color(c.fillcolor);
set_fill_style(c.fillstyle);
draw_circle(c.xco, c.yco, c.rad);
}

int main()
{
init_graphics();
circle c1={15, 7, 5, cBLUE, X_FILL};
circle c2={41, 12, 7, cRED, O_FILL};
circle c3={65, 18, 4, cGREEN, MEDIUM_FILL};

circ_draw(c1);
circ_draw(c2);
circ_draw(c3);
set_cursor_pos(1, 25);
return 0;
}

my turboC++ compiler doesnt find the headerfile, using TurboC++ 3.0 by borland int.
User is offlineProfile CardPM
+Quote Post

janotte

RE: Graphics

13 Apr, 2009 - 12:13 AM
Post #6

code > sword
Group Icon

Joined: 28 Sep, 2006
Posts: 2,157



Thanked: 152 times
Expert In: C/C++

My Contributions
Please code.gif
User is offlineProfile CardPM
+Quote Post

Syed Faraz

RE: Graphics

14 Apr, 2009 - 09:19 PM
Post #7

New D.I.C Head
*

Joined: 9 Apr, 2009
Posts: 8


My Contributions
QUOTE(janotte @ 13 Apr, 2009 - 12:13 AM) *

Please code.gif

CODE
#include<constream.h>
#include<msoftcon.h>

struct circle
{
int xco, yco;
int rad;
color fillcolor;
fstyle fillstyle;
};

void circ_draw(circle c)
{
set_color(c.fillcolor);
set_fill_style(c.fillstyle);
draw_circle(c.xco, c.yco, c.rad);
}

int main()
{
init_graphics();
circle c1={15, 7, 5, cBLUE, X_FILL};
circle c2={41, 12, 7, cRED, O_FILL};
circle c3={65, 18, 4, cGREEN, MEDIUM_FILL};

circ_draw(c1);
circ_draw(c2);
circ_draw(c3);
set_cursor_pos(1, 25);
return 0;
}

sorry sir

User is offlineProfile CardPM
+Quote Post

janotte

RE: Graphics

15 Apr, 2009 - 03:18 AM
Post #8

code > sword
Group Icon

Joined: 28 Sep, 2006
Posts: 2,157



Thanked: 152 times
Expert In: C/C++

My Contributions
You may not have those files installed by default.

Have a read here about how to get them and use them.
http://www.tvdsb.on.ca/saunders/courses/on...s/msconsole.htm

User is offlineProfile CardPM
+Quote Post

Syed Faraz

RE: Graphics

20 Apr, 2009 - 10:49 PM
Post #9

New D.I.C Head
*

Joined: 9 Apr, 2009
Posts: 8


My Contributions
QUOTE(janotte @ 15 Apr, 2009 - 03:18 AM) *

You may not have those files installed by default.

Have a read here about how to get them and use them.
http://www.tvdsb.on.ca/saunders/courses/on...s/msconsole.htm


I'll check this out;
THANKS smile.gif
User is offlineProfile CardPM
+Quote Post

Syed Faraz

RE: Graphics

24 Apr, 2009 - 08:50 AM
Post #10

New D.I.C Head
*

Joined: 9 Apr, 2009
Posts: 8


My Contributions
QUOTE(Syed Faraz @ 20 Apr, 2009 - 10:49 PM) *

QUOTE(janotte @ 15 Apr, 2009 - 03:18 AM) *

You may not have those files installed by default.

Have a read here about how to get them and use them.
http://www.tvdsb.on.ca/saunders/courses/on...s/msconsole.htm


I'll check this out;
THANKS smile.gif

That again irritates me with 'windows.h'
hoping better rolleyes.gif

User is offlineProfile CardPM
+Quote Post

prabh

RE: Graphics

24 Apr, 2009 - 11:58 AM
Post #11

D.I.C Regular
Group Icon

Joined: 27 Dec, 2008
Posts: 289



Thanked: 8 times
Dream Kudos: 25
My Contributions
QUOTE(Syed Faraz @ 24 Apr, 2009 - 08:50 AM) *

QUOTE(Syed Faraz @ 20 Apr, 2009 - 10:49 PM) *

QUOTE(janotte @ 15 Apr, 2009 - 03:18 AM) *

You may not have those files installed by default.

Have a read here about how to get them and use them.
http://www.tvdsb.on.ca/saunders/courses/on...s/msconsole.htm


I'll check this out;
THANKS smile.gif

That again irritates me with 'windows.h'
hoping better rolleyes.gif

Dude if you are having same problem with this file search on internet and
modern compilers come with these files
use
check your include folder
and vc++ and other compilers also give this error because if you type
CODE

#include <windows.h>

so to clear this error
i type
CODE

#include <windows>






again if have the same problem then you need a new compiler

vc++ 2008list of free c++ compilers is here express is free

User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic

Time is now: 11/7/09 03:48PM

Live C++ Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month