Search:

Type: Posts; User: achacha

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,547

    There are things called "hardware exceptions",...

    There are things called "hardware exceptions", which are specific to windows platform. You can use Microsoft specific:



    __try
    {
    // guarded code
    }
    __except ( expression )
    {
  2. Thread: 32 and 64

    by achacha
    Replies
    9
    Views
    1,067

    What OS did you use to compile and what OS is...

    What OS did you use to compile and what OS is your friend running?
  3. Replies
    19
    Views
    2,855

    http://www.mathcom.com/corpdir/techinfo.mdir/scifa...

    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.
  4. Try using "LPT1:" instead of "LPT1", since the...

    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?
  5. Replies
    3
    Views
    3,102

    UDP is one of protocols that is used for speed...

    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...
  6. Replies
    17
    Views
    2,066

    strstr() finds a string in a string.

    strstr() finds a string in a string.
  7. Replies
    12
    Views
    7,730

    First DrawShape should have a virtual destructor...

    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?
  8. Replies
    21
    Views
    5,776

    There are lots and lots :) Try:...

    There are lots and lots :)

    Try: http://www.agner.org/random/ as a start.
  9. Thread: Variable Scope

    by achacha
    Replies
    5
    Views
    4,770

    more convenient way

    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;
    }
  10. Thread: new line

    by achacha
    Replies
    16
    Views
    2,139

    Here is a sample implementation of endl: ...

    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...
  11. Replies
    8
    Views
    1,177

    I would disagree with that, you want to use the...

    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...
  12. Replies
    10
    Views
    1,710

    Sorry about that, my compiler was tied up and I...

    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()
  13. Replies
    10
    Views
    1,710

    There is also a C++ version that works: ...

    There is also a C++ version that works:



    #include <iostream>

    using namespace std;

    string getMyName()
    {
  14. Replies
    18
    Views
    4,329

    Instead of being rude and wasting time telling...

    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...
  15. Thread: Need Help

    by achacha
    Replies
    5
    Views
    1,090

    total=total+score; has capacity to only have a...

    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...
  16. Thread: Inheritance...

    by achacha
    Replies
    3
    Views
    964

    There are plenty of books written on object...

    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...
  17. Replies
    44
    Views
    4,013

    #include

    #include <deque>
  18. Replies
    4
    Views
    1,296

    This is very non-portable in C++ as the code is...

    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...
  19. Replies
    16
    Views
    4,124

    Double post: ...

    Double post: http://cboard.cprogramming.com/showthread.php?s=&threadid=43646
  20. Replies
    15
    Views
    6,048

    You can always use C++ and maps to solve the...

    You can always use C++ and maps to solve the problem:



    #include <iostream>
    #include <map>

    class EnumDayOfWeek
    {
    public:
  21. Replies
    2
    Views
    6,037

    You can have console applications that uses MFC,...

    You can have console applications that uses MFC, which allows you to control the current window and do a lot of other things.
  22. Replies
    4
    Views
    1,256

    char *word2 is a pointer to an array of char's,...

    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...
  23. Replies
    4
    Views
    1,256

    When you say: char word[80] = {0}; You are...

    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...
  24. Replies
    4
    Views
    3,747

    The printf and friends (like fprintf, scanf,...

    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...
  25. Replies
    4
    Views
    14,281

    You cannot add strings in C/C++, you have to use...

    You cannot add strings in C/C++, you have to use strcat() and strcpy() functions...
Results 1 to 25 of 66
Page 1 of 3 1 2 3