Search:

Type: Posts; User: TerranFury

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    35
    Views
    2,665

    Use winsock and connect to a time server?

    Use winsock and connect to a time server?
  2. Replies
    10
    Views
    1,224

    If you program in a protected mode environment...

    If you program in a protected mode environment like Windows, the chances of writing to memory and screwing something important up are just about zero.
  3. Replies
    4
    Views
    1,263

    You keep a pointer to the first node. Then, you...

    You keep a pointer to the first node. Then, you go from node to node until you reach the end node, whose "next" pointer is NULL. That's all there is to it.

    Here's some sample C++ source that may...
  4. Replies
    3
    Views
    1,433

    int num; if(cin >> num) { cout

    int num;

    if(cin >> num)
    {
    cout << "It's a number!\n";
    }
    else
    {
    cout << "It's not a number!\n";
    }
  5. Replies
    11
    Views
    1,400

    Basically, think C without pointers or...

    Basically, think C without pointers or bit-shifting, with a string data type, and with arrays that can be re-allocated. Then think of each branch of the switch() statement you'd put in your message...
  6. Replies
    63
    Views
    6,200

    Poll: I taught myself C++ by going to websites and...

    I taught myself C++ by going to websites and exerimenting. Though I've still got a little ways to go in terms of OO design, I can write relatively well-organized code to solve most problems.

    I...
  7. Replies
    25
    Views
    19,905

    I believe those tutorials are by NeHe and...

    I believe those tutorials are by NeHe and instruct the use of OpenGL under Windows.
  8. Replies
    3
    Views
    3,915

    I think the reason you're not getting any replies...

    I think the reason you're not getting any replies is because nobody can read your code. Try putting it in [ c o d e ] tags (but without the spaces of course) and use proper indentation so that...
  9. Replies
    5
    Views
    8,564

    Basically how it's done: bool isdigit(char...

    Basically how it's done:



    bool isdigit(char c)
    {
    if(c >= '0' && c <= '9')
    return true;

    return false;
  10. Replies
    6
    Views
    886

    Think of recursive functions as boxes within...

    Think of recursive functions as boxes within boxes. Your function was as follows:



    int Fibonacci(int N)
    {
    if ((N == 1) || (N == 2)) // base cases
    return 1;
    ...
  11. Replies
    14
    Views
    1,134

    When you do something like this: char x[823];...

    When you do something like this:

    char x[823];

    The array is allocated on the stack. The stack is not very large. If you do this, however:

    char * x = new char[823]

    ...then it is allocated...
  12. Replies
    4
    Views
    1,136

    I remember seeing a program that would take a DOS...

    I remember seeing a program that would take a DOS EXE file and output C source for it. I never tried it, but I do know that there was a bug in it such that it could only decompile small programs. ...
  13. Replies
    10
    Views
    2,710

    Conditionals invariably involve jumps; I...

    Conditionals invariably involve jumps; I understand that. Why then add the additional jump of a goto? You say that conditionals involve tests whereas gotos do not, and you're right. However,...
  14. Replies
    10
    Views
    2,710

    The jmp family of instructions should be avoided...

    The jmp family of instructions should be avoided whenever possible. They will cause the pipeline to stall. On x86 architectures, especially the new PIII and PIV CPUs, these and cache misses are...
  15. Sure, programmers work in hex, but the theory...

    Sure, programmers work in hex, but the theory behind modern computers is still founded on the base-2 number system.

    Anyway, back on topic:

    Go ahead, learn Java. The more you know, the better. ...
  16. Replies
    2
    Views
    1,152

    If x is an integer, (cin >> x) evaluates to false...

    If x is an integer, (cin >> x) evaluates to false if the input is non-numeric. Example:

    [code]
    int x;
    cout << "Enter a number: ";
    if(cin >> x)
    {
    cout << "You just input the number " <<...
  17. Replies
    2
    Views
    1,381

    using an unsigned _int64 would give you the best...

    using an unsigned _int64 would give you the best results if you're only using positive numbers. If you need something even bigger, then you may have to code a class that strings together a whole...
  18. Replies
    2
    Views
    15,202

    There's also the really slow unportable way: ...

    There's also the really slow unportable way:




    system("cls");


    lol
  19. Replies
    3
    Views
    2,097

    If you have a "stable" sorting algorithm, then,...

    If you have a "stable" sorting algorithm, then, to use an example, if you sort wage, and then hours, and then dept. number, you'll get output something like this:



    DEPT # ...
  20. Replies
    7
    Views
    1,495

    There's a command in x86 ASM to do the...

    There's a command in x86 ASM to do the wrap-around shifting, but I forget what it is...
  21. Replies
    3
    Views
    1,425

    float myInput; cin >> myInput; if(myInput ==...

    float myInput;
    cin >> myInput;
    if(myInput == (int)myInput)
    cout << "You entered the integer " << myInput;
  22. Replies
    5
    Views
    1,818

    Nibbles!!! (the snake game)

    Nibbles!!! (the snake game)
  23. Replies
    4
    Views
    4,728

    Equation solver

    There exist formulae which can solve quadratic and cubic equations. It is mathematically impossible for a simple formula to exist to solve quintic (not sure about quartic) polynomial equations.
    ...
  24. Replies
    4
    Views
    1,617

    EDIT: That should be "sld" instead of "std" in...

    EDIT: That should be "sld" instead of "std" in the above ASM.
  25. Replies
    4
    Views
    1,617

    I was curious to see if there was any way to do...

    I was curious to see if there was any way to do strcmp in ASM other than the method that the standard strcmp uses. It seems that the ASM operation "cmpsb" can be useful for quickly comparing strings...
Results 1 to 25 of 47
Page 1 of 2 1 2