Search:

Type: Posts; User: Clairvoyant1332

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Also posted here...

    Also posted here and here
  2. Can't get MCAST_JOIN_GROUP to work on Windows 7

    Calling setsockopt with MCAST_JOIN_GROUP results in error 10014: The system detected an invalid pointer address in attempting to use a pointer argument in a call.

    Using similar code on Linux works...
  3. Drop the semicolons directly after the if...

    Drop the semicolons directly after the if condition and the else condition.
  4. Here's some code that demos the problem: The...

    Here's some code that demos the problem:

    The receiver:


    #include <sys/socket.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <netinet/in.h>
    #include <strings.h>
  5. Issue with multicast when socket isn't bound to INADDR_ANY

    If I create a socket bound to INADDR_ANY, then bind to a multicast address (say 230.4.4.1) on one or more interfaces (say 192.168.1.1 and 192.168.2.1), that socket will receive packets sent to...
  6. Replies
    2
    Views
    2,270

    Basically, a socket is dual stack if it can bind...

    Basically, a socket is dual stack if it can bind to both an IPv4 address and an IPv6 address. You do this by creating an IPv6 socket then setting the IPV6_V6ONLY socket option (under the...
  7. Replies
    31
    Views
    2,940

    Sounds like a UDP joke.

    Sounds like a UDP joke.
  8. That's exactly it. From the perspective of an...

    That's exactly it. From the perspective of an observer on the ground, the photon is moving diagonally. But from the perspective on a person on the ship, the photon is moving perpendicular to the...
  9. Replies
    7
    Views
    1,094

    By doing this: Print; You're not actually...

    By doing this:


    Print;

    You're not actually calling the function. You're just referencing it, and since you're not using the reference in an expression, nothing happens.

    You want to do this:
  10. Now there's a movie that takes at least two or...

    Now there's a movie that takes at least two or three viewings to get.
  11. I suppose you could logically store, for example,...

    I suppose you could logically store, for example, two 8 bit values in a 16 bit variable, then swap the bytes. However you'd need to either have two separate 8 bit variables to start with, or two...
  12. And that is precisely why an "if" (or "for" or...

    And that is precisely why an "if" (or "for" or "while") should be written like this:


    if (condition) {
    statement1;
    } else {
    statement2;
    }
  13. Replies
    6
    Views
    1,039

    The dimY when freeing wasn't the problem. The...

    The dimY when freeing wasn't the problem. The dimX while mallocing is.
  14. Sure. Just start counting from the end of the...

    Sure. Just start counting from the end of the array instead of the beginning and decrement counter.
  15. Replies
    8
    Views
    3,985

    In ADT.h, you have this: void...

    In ADT.h, you have this:


    void LISTdeleteel(list*)

    When you should probably have this:


    void LISTdeleteel(list*);
  16. Replies
    12
    Views
    10,921

    Given the size of the array x by y, and the...

    Given the size of the array x by y, and the number of X's n, you would call a function to generate n random numbers from 1 to x*y and store each in an array passed in as an argument. In the interest...
  17. Replies
    3
    Views
    2,482

    A mode of 10xxxx means it's a regular file. ...

    A mode of 10xxxx means it's a regular file.

    From /usr/include/linux/stat.h:



    #define S_IFSOCK 0140000
    #define S_IFLNK 0120000
    #define S_IFREG 0100000
    #define S_IFBLK 0060000
  18. I don't immediately see any problem, but I'm...

    I don't immediately see any problem, but I'm willing to bet the error is actually somewhere above this snippet of code.
  19. In the cases where c is 0 or out of range, you...

    In the cases where c is 0 or out of range, you print an error message but otherwise don't do anything about it, so your program continues on. You should either exit() or return when the user inputs...
  20. Replies
    6
    Views
    8,751

    You need to keep y separate from term. y should...

    You need to keep y separate from term. y should only get modified in the "for" statement. terms should be initialized to angle. Also, given that y starts at 1, you're better of using (y+1)*(y+2)...
  21. Replies
    6
    Views
    8,751

    You don't want to change angle. Create another...

    You don't want to change angle. Create another variable for the sum and another for the current term. You can also keep track of the previous term and check the difference on each iteration. Also,...
  22. Yes. cout is an ostream, so you can pass it in....

    Yes. cout is an ostream, so you can pass it in.

    Also, just to be consistent, in your printData() function, replace references to "cout" with "out". If you call students[i].printData(cout), then...
  23. Sure it may compile fine, but it won't do what...

    Sure it may compile fine, but it won't do what you expect when you run it.

    cout is a predefined stream in iostream.h that writes to standard output (i.e. your terminal). Like grumpy said, you...
  24. Replies
    6
    Views
    8,751

    Your loop is running until the difference between...

    Your loop is running until the difference between two consecutive terms in the series is below your EPSILON threshold. Then you return only a single value in the series, namely the one after the...
  25. My mistake, I didn't see function call you...

    My mistake, I didn't see function call you quoted. You're passing in this->Handle as the second parameter but you don't show how Handle is declared. Based on the error message, I'm guessing it's...
Results 1 to 25 of 90
Page 1 of 4 1 2 3 4