Plot graph in visual c++ and in borland c ver 3.1

Discussion in 'Software' started by Gerrald Toh, Nov 29, 2005.

  1. Gerrald Toh

    Gerrald Toh Private E-2

    Hello all,

    Im doing a school project which require me to get readings from a machine and plot the results in the graph to be displayed on the LCD screen

    is like x-axis=time(sec)
    y-axis= Value A

    So like at t=30s, A=50
    t=60s, A=100

    How do i write the source code to be able to run in visual c++ and in borland c.
    How do i represent the results found and display in x,y axis?

    Thank you all for giving me some head-start or where to obtain the required information. Thanks
     
  2. Wookie

    Wookie Sergeant Major

    Well those are the compilers, the program should compile in either of them since for the most part they follow the standards of the language. You just need to make sure the compilers point to the right libraries that you are going to use.


    Well I supposed you could draw a plot, x/y points on the screen. There would be multiple ways to do this, use someone elses pre-built functions
    http://www.codecutter.net/tools/koolplot/


    http://www.softintegration.com/webservices/plot/applet_func.html


    Or some other library, such as http://www-mdp.eng.cam.ac.uk/CD/engapps/ctutor/vogle.html


    However you do it I imaging your going to have to learn to put specific points to the screen relative to the programs X/Y. A Command window is usually 80 wide by something tall.

    I have memories of doing this is Pascal but its been a few years :)
     
  3. Gerrald Toh

    Gerrald Toh Private E-2

    thank you so much.
    i will try it.

    sorry for this late reply, i was very sick for the past week.
     
  4. Gerrald Toh

    Gerrald Toh Private E-2

    Just another question...

    this graphical functions need certain library to work with. So how can i have them and include in my c++ program?

    can i just download and add them to the c++or borland c program?

    thanks
     
  5. QuickSilver

    QuickSilver Corporal

    Typically if you're using another library you download the .c and .h files or however they're packaged, and then include them in your source... so if I had a library for amazing graphics called amazing.c, with an accompanying amazing.h header file then you copy the files into the path, either your working directory or another defined path, and in your source file include the line:

    #include "amazing.h"

    This will be with all your other #includes.

    You may wonder why I've used paired "s instead of <>. You may also not have a clue what I'm talking about above, so maybe this link will help explain a few questions away.

    Once your main program has the #include line in it tells the compiler that there is more code that needs to be compiled, and opens up all the functions in the library for you to use.
    SOme associated documentation should tell you exactly what those are and how to use them (usage, return codes, etc)....

    Hope that helps get you started...
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds