Solved

Plot (screen) function with c++

Posted on 2000-04-05
7
240 Views
Last Modified: 2008-03-17
I am learning cpp, and know there are several functions to plot at the screen with. What is the most common one, which I can find in turbo c++? How do I use it?

Please send me an easy-understood example to my mail too: pluto@organizer.net

thanks
0
Comment
Question by:PPC022499
  • 4
  • 2
7 Comments
 
LVL 22

Expert Comment

by:nietod
Comment Utility
>> I am learning cpp, and know there are several
>> functions to plot at the screen with
Actually not true.  Standard C++ contains no features at all for dealing with graphics.  In fact standard C++ does not even assume that there progam is running on a computer with a monitor.  Standard C/C++ only assumes that there is a text based output device, this coudl be a screen, but it could be a text file, a teletype, a punch card hole punch etc.  so it has no support for graphics.

If you want to have graphics you have to use non-standard (non-portable) procedures.   Turbo C++ may provide provide procedures like this, I don't know, but they are not really part of C++.
0
 

Author Comment

by:PPC022499
Comment Utility
Adjusted points from 50 to 100
0
 

Author Comment

by:PPC022499
Comment Utility
Well, thanks! But do you know if there are any more "common" used functions - which follows the most compilors?

Do you know how to use any of them?

Do you have a tiny library for me, with a "plot" function as explained?

If you could mail me one with an example of how to use it I'll give you the 100 points and accept it as an answer!
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 22

Expert Comment

by:nietod
Comment Utility
>> But do you know if there are any more
>> "common" used functions
Nope.  This is because this must vary increadibly from one OS to another and from one computer design to another.  I have don graphics work on 3 platforms and there was NO similarity what-so-ever.

Turbo-C might very well have procedures for performing grphics, but I asure you you won't be able to port them to other OSs or ciompilers without significant changes.

If you can't find any functions that are with Turbo-C you can use the DOS video services, but this is a lot of work and requires a little knowledge of assembly.
0
 

Author Comment

by:PPC022499
Comment Utility
Ok, thanks again...!

I'll see to it  :)
0
 

Accepted Solution

by:
koniant earned 100 total points
Comment Utility
If you want to use graphics, Allegro is an OK library. It's portable from what I understand, and can be found on www.freshmeat.net.
0
 

Author Comment

by:PPC022499
Comment Utility
OK, hope it'll work.

Following the TC++ comes some libraries, and the putpixel function is there. I managed to use it and am satisfied actually. Thanks anyway!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now