There are things called "hardware exceptions", which are specific to windows platform. You can use Microsoft specific:
__try
{
// guarded code
}
__except ( expression )
{
Type: Posts; User: achacha
There are things called "hardware exceptions", which are specific to windows platform. You can use Microsoft specific:
__try
{
// guarded code
}
__except ( expression )
{
What OS did you use to compile and what OS is your friend running?
http://www.mathcom.com/corpdir/techinfo.mdir/scifaq/q210.html
Look for L'Ecuyer or Marsaglia, both have written large period random numbers and C algorithms are available online.
Try using "LPT1:" instead of "LPT1", since the device is identified with as left of :, I al thinking you have a file called LPT1 in your output directory?
UDP is one of protocols that is used for speed (there are many ways to tune it, like using data portion than is <1k to limit self to 1 packet per transmission, etc).
You first need to figure out...
strstr() finds a string in a string.
First DrawShape should have a virtual destructor if you indend to use any virtual methods. But this does not asnwer why it is complaining.
Can you post the exact error you are getting?
There are lots and lots :)
Try: http://www.agner.org/random/ as a start.
unsigned long count_it()
{
static unsigned long count = 0;
++count;
cout << "The number of times this function has been called is " << count << "\n";
return count;
}
Here is a sample implementation of endl:
template<class _Elem, class _Traits> inline
basic_ostream<_Elem, _Traits>&
__cdecl endl(basic_ostream<_Elem, _Traits>& _Ostr)
{ // insert...
I would disagree with that, you want to use the stack when you may have few small objects, but you really don't want to polute the stack with lots of objects.
There is a wonderful thing called...
Sorry about that, my compiler was tied up and I thought I could get away with it... I was wrong :)
#include <iostream>
#include <string>
using namespace std;
string getMyName()
There is also a C++ version that works:
#include <iostream>
using namespace std;
string getMyName()
{
Instead of being rude and wasting time telling the person about how much you are not going to answer his question, you could have just hit the back button and moved on to something a little more...
total=total+score;
has capacity to only have a total of 2^32.. 4 billion. If you enter 2 numbres that amount to more than that the result will be quite unexpected.
I would declare:
double...
There are plenty of books written on object oriented programming, trying to summarize it here would be too time consuming.
Polymorphism is one benefit that comes to mind...
#include <deque>
This is very non-portable in C++ as the code is CPU/platform specific. You want to write a distributed system that allows objects to transfer themselves anywhere?! Or are you just looking for a way...
Double post: http://cboard.cprogramming.com/showthread.php?s=&threadid=43646
You can always use C++ and maps to solve the problem:
#include <iostream>
#include <map>
class EnumDayOfWeek
{
public:
You can have console applications that uses MFC, which allows you to control the current window and do a lot of other things.
char *word2 is a pointer to an array of char's, so you are really doing:
char *word2 = NULL;
at a later time you must use new/delete to allocate/deallocate the actual string.
char...
When you say:
char word[80] = {0};
You are telling the compiler to allocate 80 characters in an array for you to use.
When you say:
char *words[80] = {0};
You are telling the compiler...
The printf and friends (like fprintf, scanf, sprintf and others) use the elipsis operator to pass parameters. This means that things are parsed using vargs macros (or however the compiler has it...
You cannot add strings in C/C++, you have to use strcat() and strcpy() functions...