Your question is vague. Do you want to write a C++ program to make arbitrary graphs of math functions? Or do you just want to use a program to graph math functions?
Writing a program to draw graphs usually involves a graphing library, so google for terms like C++ graphing library. Or search for other terms like C graphing library, or Cocoa graphing library. Or substitute chart for graph. Or use Google Charts and submit a URL to retrieve a graph.
If you just want to use a program to graph math functions, look at /Applications/Utilities/Grapher.app. You don't even have to write C++ or use Xcode.
Chown33 thank you.
I am trying to learn how to perform pixel-level operations using C++ on the mac. Essentially drawing objects, functions, color manipulation etc.