if u give cordinates to programme at run time and want a line to be
drawn.. how to do this in c without usin any graphics function?
like x1,y1 and x2,y2
and lines should be drawn from the 1st co-ordinate to 2nd one
any pointer would be appreciated
Thanks
Sep 6 '07
43 1928
Richard Heathfield <rj*@see.sig.in validwrites:
Chris Hills said:
>In article <Pc************ *************** ***@bt.com>, Richard Heathfield <rj*@see.sig.in validwrites
>>>Chris Hills said: ise.
>void main() >Wrong. main returns int.
Not always but if we are assuming "conio.h" then it should
Whether main may return something other than int does *not* depend on the availability or otherwise of a header named <conio.h>, but on whether the implementation is a hosted C90 implementation.
A hosted C90 platform...
The C Standard doesn't define, or even use, the term "platform", so we
can't guarantee that we are using the word in the same way.
Two programmers talking to each other can. if you can't then you have
lost all links with reality.
>
>however if he is using conio I think it is fairly safe to assume he is on an MS platform so it should return an Int
int (C doesn't define the term "Int"). In my previous reply I pointed
out why your assumption is not necessarily correct.
I sometimes wonder if you can hear yourself or bother to see who you are
replying to. I would say a technical meeting with you would be akin to
rubbing vinegar into ones own eyeballs while sitting on a bed of glowing
coals.
Richard wrote:
Richard Heathfield <rj*@see.sig.in validwrites:
>The C Standard doesn't define, or even use, the term "platform", so we can't guarantee that we are using the word in the same way.
Two programmers talking to each other can.
And if you were one of them, you could proffer your understanding of
the term.
(Mr Heathfield should have made the first move in that game, I agree.)
--
Chris "ONAG!" Dollin
Hewlett-Packard Limited registered office: Cain Road, Bracknell,
registered no: 690597 England Berks RG12 1HN
Chris Dollin said:
Richard wrote:
>Richard Heathfield <rj*@see.sig.in validwrites:
>>The C Standard doesn't define, or even use, the term "platform", so we can't guarantee that we are using the word in the same way.
Two programmers talking to each other can.
And if you were one of them, you could proffer your understanding of
the term.
(Mr Heathfield should have made the first move in that game, I agree.)
Chris (no, the other one) introduced the term. I still don't know what
he means by it. I can guess, but I don't *know*. My guess is that he
means "OS", and this guess is based on the fact that he said "MS
platform", even though it does appear that the OP is probably using a
compiler written by Borland. But I'm not certain. Maybe he means
"implementation " and believes <conio.hto be a Microsoftism.
I think it's up to Chris (no, the other one) to define the meanings of
the non-standard terms he introduces into the discussion.
--
Richard Heathfield <http://www.cpax.org.uk >
Email: -www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Richard Heathfield wrote:
Chris Dollin said:
>Richard wrote:
>>Richard Heathfield <rj*@see.sig.in validwrites:
>>>The C Standard doesn't define, or even use, the term "platform", so we can't guarantee that we are using the word in the same way.
Two programmers talking to each other can.
And if you were one of them, you could proffer your understanding of the term.
(Mr Heathfield should have made the first move in that game, I agree.)
Chris (no, the other one) introduced the term. I still don't know what
he means by it. I can guess, but I don't *know*. My guess is that he
means "OS", and this guess is based on the fact that he said "MS
platform", even though it does appear that the OP is probably using a
compiler written by Borland. But I'm not certain. Maybe he means
"implementation " and believes <conio.hto be a Microsoftism.
I think it's up to Chris (no, the other one) to define the meanings of
the non-standard terms he introduces into the discussion.
But given that he didn't, I believe a better move in the game "constructi ve
discussion" would have been "I'm not sure what you mean by 'platform' here;
is it just the local OS or what?", rather than the move you made.
We have enough aggro here (yes, I'm not disputing that I've contributed;
I make no claims to perfection, only about it). I'm just wondering about
adding "crush them with kindness" to the toolbag, for whatever one's
value of "them" [1] might be. We can't all be Chris Torek -- there'd
be no room in the kitchen -- but /he/ manages to be topical /and/
non-abrasive.
--
Chris "no such thing" Dollin
Hewlett-Packard Limited Cain Road, Bracknell, registered no:
registered office: Berks RG12 1HN 690597 England
Chris Dollin <ch**********@h p.comwrites:
Richard wrote:
>Richard Heathfield <rj*@see.sig.in validwrites:
>>The C Standard doesn't define, or even use, the term "platform", so we can't guarantee that we are using the word in the same way.
Two programmers talking to each other can.
And if you were one of them, you could proffer your understanding of
the term.
(Mr Heathfield should have made the first move in that game, I agree.)
It is a non issue in a technical group discussing C. Heathfield is
overly pedantic and up himself, great C programmer though he might be.
Richard Heathfield <rj*@see.sig.in validwrites:
Chris Dollin said:
>Richard wrote:
>>Richard Heathfield <rj*@see.sig.in validwrites:
>>>The C Standard doesn't define, or even use, the term "platform", so we can't guarantee that we are using the word in the same way.
Two programmers talking to each other can.
And if you were one of them, you could proffer your understanding of the term.
(Mr Heathfield should have made the first move in that game, I agree.)
Chris (no, the other one) introduced the term. I still don't know what
he means by it. I can guess, but I don't *know*. My guess is that he
means "OS", and this guess is based on the fact that he said "MS
platform", even though it does appear that the OP is probably using a
So it was perfectly clear then. It is an MS Platform. MS. Platform. But
since you dont care about any specifics then it really doesn't matter if
its a platform for social re-engineering since it mentioned a platform, a
platform specific include and is therefore "OT".
compiler written by Borland. But I'm not certain. Maybe he means
"implementation " and believes <conio.hto be a Microsoftism.
Does it matter. It works for him.
>
I think it's up to Chris (no, the other one) to define the meanings of
the non-standard terms he introduces into the discussion.
What do you mean by "discussion " here?
See? Silly isn't it.
"Walter Roberson" writes:
In article <5k************ @mid.individual .net>,
osmium <r1********@com ast.netwrote:
>>"Mark McIntyre" writes:
>>>>Drawing a line is a graphics function.
>>Whats wrong with puts("_______ "); puts("|"); puts("|"); puts("|");
>>It doesn't meet the spec. The OP gave x and y coordinates in his question. Rounding an angle to the nearest 45 degrees, at best, wouldn't satisfy that by any stretch of the imagination.
The OP did not require that the drawn line proceed straight from
the beginning to ending coordinates. If the coordinates are
integral and finite, then you could draw a 45 degree line of length
min(abs(x1-x0),abs(y1-y0)), and a straight line of length
max(abs(x1-x0),abs(y1-y0))-min(abs(x1-x0),abs(y1-y0))
provided that the shorter of these two fit whatever page-size is in use.
My preference when answering is to start out by assuming the OP is not a
moron.
Richard wrote:
Richard Heathfield <rj*@see.sig.in validwrites:
>Chris (no, the other one) introduced the term. I still don't know what he means by it. I can guess, but I don't *know*. My guess is that he means "OS", and this guess is based on the fact that he said "MS platform", even though it does appear that the OP is probably using a
So it was perfectly clear then.
The word "guess" indicates otherwise. Furthermore, the person who can
say yay or nay -- viz, Chris Hills -- hasn't spoken on it yet. Your
guess is just that -- another guess.
>I think it's up to Chris (no, the other one) to define the meanings of the non-standard terms he introduces into the discussion.
What do you mean by "discussion " here?
Good question. "Aggravated argument" would sometimes be closer. But
while what "platform" meant seems to make a different to what Mr
Heathfield would have said, would what "discussion " means make a
difference to what /you/ say?
See? Silly isn't it.
Can't tell. By the same logic as I applied before, /your/ move should
have been to say that you weren't sure what "discussion " meant, this
is what you thought, and how did that fit?
--
Chris "oops, must write this nested anonymous class now" Dollin
Hewlett-Packard Limited registered office: Cain Road, Bracknell,
registered no: 690597 England Berks RG12 1HN
Chris Dollin said:
Richard Heathfield wrote:
>Chris Dollin said:
>>Richard wrote:
Richard Heathfield <rj*@see.sig.in validwrites:
The C Standard doesn't define, or even use, the term "platform", so we can't guarantee that we are using the word in the same way.
Two programmers talking to each other can.
And if you were one of them, you could proffer your understanding of the term.
(Mr Heathfield should have made the first move in that game, I agree.)
Chris (no, the other one) introduced the term. I still don't know what he means by it. I can guess, but I don't *know*. My guess is that he means "OS", and this guess is based on the fact that he said "MS platform", even though it does appear that the OP is probably using a compiler written by Borland. But I'm not certain. Maybe he means "implementation " and believes <conio.hto be a Microsoftism.
I think it's up to Chris (no, the other one) to define the meanings of the non-standard terms he introduces into the discussion.
But given that he didn't, I believe a better move in the game
"constructi ve discussion" would have been "I'm not sure what you mean
by 'platform' here; is it just the local OS or what?", rather than the
move you made.
Perhaps. I make no claim to perfection. But I wasn't trying to pull
Chris(no, the other one)'s nose or anything. I just didn't word it very
well. I still think it would be better for Chris (no, the other one) to
clarify what he's talking about.
<snip>
We can't all be Chris Torek -- there'd be no room in the kitchen
Perhaps we need to build an extension.
-- but /he/ manages to be topical /and/ non-abrasive.
Yes, he manages it admirably. His killfile must be simply colossal.
--
Richard Heathfield <http://www.cpax.org.uk >
Email: -www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Richard Heathfield wrote:
Chris Dollin said:
>We can't all be Chris Torek -- there'd be no room in the kitchen
Perhaps we need to build an extension.
If we exceed the capacity of the kitchen, it follows that the behaviour
will be undefined. This is a suitable place for an implementation to
have an extension. However, I think the current kitchen (and coffee)
owner should have a say.
>-- but /he/ manages to be topical /and/ non-abrasive.
Yes, he manages it admirably. His killfile must be simply colossal.
I don't think it's (just) his killfile.
--
Chris "aspiring, also perspiring. Friday!" Dollin
Hewlett-Packard Limited registered no:
registered office: Cain Road, Bracknell, Berks RG12 1HN 690597 England This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: JBiagio |
last post by:
Hello All,
I am attempting to learn a bit about the GDI+ transforms and charting data and I
feel like I'm getting a handle on how the transforms work. My chart object has a
large "canvas" bitmap that all data is scaled to and rendered on, and I display
a smaller "window" of the canvas that the user can page through left and right.
I've been able to scale my data (for the purposes of this discussion, x values
are 0 - 2PI and y values...
|
by: Pmb |
last post by:
At the moment I'm using Borland's C++
(http://www.borland.com/products/downloads/download_cbuilder.html#)
I want to be able to take an array of points and plot them on the screen. Is
there a way to do this? E.g. I want to be able to graph a function. At this
point I'm not up to a level in C++ where I want to start learning Visual C++
so I don't want to go that route.
Thanks
|
by: Marc Pelletier |
last post by:
Hello all,
I have a class which includes a method to create a chart. I want to be able
to call this method from asp.net code as well as windows application code,
so I have sketched it out as returning a bitmap instance.
In my asp.net code I think I should call this method to return a bitmap and
then somehow stream it using the response object to the Webcontrols.image.
Is that right? The image object is on a page with a number of...
|
by: RamyaKarthik |
last post by:
pls give some guide lines for developing project for online survey usin c++
|
by: Ringo |
last post by:
I need some help. I have an app that talks to a sonar board via the
serial port. In my sp_DataReceived I gather all the data and put it
into arrays. Then I want to draw the data in a pictureBox. I wrote a
function called Draw_sonar2 that does all the drawing. It usually
works but sometimes crashes saying the graphics object is already in
use. After digging I saw that I should be doing the Drawing in the
PB.paint, not a seperate function....
| |
by: Slickuser |
last post by:
I have this function that will fill the ellipse every 10 seconds with
specific x,y,w,h.
Now I want do the the reverse, to clear the ellipse with given x,y
using Timer at every 30s.
Or I have put these (x,y,w,h) to an array?
Later go back the array and fill ellipse with the same color as
background?
Is there an easy way?
|
by: jt |
last post by:
i think i was not clear in my quesiton.
my question actually was how to store a graphics image generated in C.
Eg.
#include<graphics.h>
void main()
{
int gm,gd=DETECT;
initgraph(&gd,&gm,"");
rectangle(50,50,200,300);
|
by: DaveL |
last post by:
hello
I have a Bit map 1367 wide 32 high
this bitmap contains like 40 separate Images
32x32
I tell it the id*32 to get the approiate Image from
the source Bitmap
When i CreateGraphics() From the Standard CreateGraphics() function the code
below works
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |