Im trying to create a quadratic equation using class, and to put some values into it. first i was trying to print it in the form of "ax^2 + bx + c" and second i was trying to evaluate it at given x.
#include <iostream>
using namespace std;
class Quadratic {
private:
int a;
int b;
int c;
public:
Quadratic(int d1, int d2, int d3){
a=d1;
b=d2;
c=d3;}
void print();
int evaluate (int x);
};
'project.exe': Loaded 'C:\Users\Fares\Documents\Visual Studio 2010\Projects\project\Debug\project.exe', Symbols loaded.
'project.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'project.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'project.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'project.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
'project.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
The program '[6592] project.exe: Native' has exited with code 0 (0x0).
PLEASE USE CODE TAGS (the <> formatting button) when posting code. http://v2.cplusplus.com/articles/jEywvCM9/
It makes it easier to read your code and it also makes it easier to respond to your post.
Hint: You can edit your previous post, highlight your code and press the <> formatting button.
System functions aren't entirely recommended though (I mean, for a quick fix and in this situation it makes sense). If you're going to pause in the future though I recommend using http://www.cplusplus.com/reference/thread/this_thread/sleep_for/ It's straightforward, and gets the job done.
Does anyone know why Microsoft doesnt just make a feature that does this automatically, because codeblocks does this, and Im pretty sure Microsoft can aswell.