The C++ standard does not say anything about a 'stack' or a 'heap'. It operates with terms 'automatic' and 'dynamic'. The standard does not...
what do you mean GCD for fractions?! I am aware of no such thing
Re: question Well, first of all, I think you should have googled it, and THEN, if you had any questions posted them here... but hey! :) So, an...
Well you could do the following #include <ctime> //for time #include <cstdlib> //for srand and rand int main() { std::srand(std::time(0))...
instead of the final int x; cin >> x; write just cin.get(); Also, move the line cout<< numOfDiv << endl; after the line...
OK, I'll write a program that does, ermm... say, prime-factorization #include <iostream> int main() { using namespace std; int...
"I will use google before asking dumb questions" "I will use google before asking dumb questions" "I will use google before asking dumb...
By all means the explanation of shabbir was excellent, indeed. Just a little complementation from me: when you write int a[n] = {a[1], a[2] ...,...
If you mean, does the operating system emit any event upon context switch which you can handle, then the answer is no, neither linux nor windows...
Since everybody has answered in C, I'll answer in C++. If you write #include <iostream> #include <string> int main() { using namespace...
easiest way - store a global variable, say numOfDiv. Every time you perform a division, increment the variable. That's all :)
I will repeat myself, DON"T use a macro unless you have to. In this particular case an inline function (a function delcared with the keyword...
In the current C++ standard it is clearly stated that the main function is special in that it cannot be overloader, called recursively and taken...
T* p = new T; T& r = *p; ///r is a reference to the dynamically allocated p here delete p; //ok, freeing memory r.dosomething;// undefined - the...
First of all, it is essential to understand that an array is NOT a pointer int a[10] the type of a is NOT int*, it is int[10] However, an array...
Yet another way is a = a + b; b = a - b; a = a - b;
The current C++ standard mandates that the main() function return int. However you don't have to ACTUALLY return a value. If the control flows out...
What threading model are you using? Windows? Posix? Anyway, I think you can't unless you have a handle to that thread (which one process might...
Well, this particular one would be like this: #define GET_FROM_STRING(s, delim) \ {\ CString temp;\ int m= s.findof(delemiter);\...
whose? You mean my question :)?
Separate names with a comma.