Click here to Skip to main content
15,890,123 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,
I need to plot a simple X-Y graph in C++. It is just one function of my code and I have the X and Y coordinates. Can it be done without using external libraries?
Btw, I am using Code::Blocks
Posted

Quote: Can it be done without using external libraries?

Can what be done? Plotting a graph is a mathematical problem and has nothing to do with computing, let alone C++. However if you want to display your graph in some way then there are various ways of accomplishing it. Perhaps you could explain what it is you want to display, and in what format.
 
Share this answer
 
Is it a Win32 application ? I suppose you are not using the MFC since you are decelopping with Code::Blocks ?
 
Share this answer
 
Comments
optimus_prime1 21-Dec-10 10:59am    
No, its not the Visual C++
Cedric Moonen 21-Dec-10 13:49pm    
Yeah but you can write a Win32 application with Code:Blocks. So, is it a win32 app or a console app ?
optimus_prime1 24-Dec-10 0:09am    
A console app
Simple pseudo-code:

MoveTo(hDC,x,y);
while (graph points)
  {
    LineTo(hDC,x,y);
  }
 
Share this answer
 
Comments
Cedric Moonen 23-Dec-10 14:00pm    
Only if it is a Win32 application. We still don't know which kind of app he is developping.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900