Search:

Type: Posts; User: PehJota

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    1,005

    Welcome to the forums and to C++ programming! ...

    Welcome to the forums and to C++ programming!



    I assume by "declared twice" (constructs such as for loops aren't "declared" by the way) you're referring to this nesting of loops?



    This is...
  2. This sounds like a message from `make`. Look in...

    This sounds like a message from `make`. Look in your project's directory/ies. Do you see a file named 'Makefile' anywhere? If so, could you please post its contents?
  3. Thread: getopt_long

    by PehJota
    Replies
    2
    Views
    2,301

    If I understand your question right, you'll want...

    If I understand your question right, you'll want to change this line:

    {"listen_port", required_argument, &listen_port_switch, 1},
    to something like:

    {"listen_port", required_argument, NULL,...
  4. Thread: help

    by PehJota
    Replies
    5
    Views
    885

    vBulletin needs a "like" button. :D To the OP:...

    You ran over your driving instructors dog, run the test again and you should pass, he doesn't have a dog any more[/QUOTE]

    vBulletin needs a "like" button. :D

    To the OP: Your code is wide open...
  5. Thread: randomizer

    by PehJota
    Replies
    7
    Views
    3,184

    Additional little nit pick: using the modulo...

    Additional little nit pick: using the modulo operator to shrink the range of rand() is okay for a simple program where uniformity is of no concern, but the results of such randomization are skewed....
  6. Replies
    2
    Views
    7,719

    Right, the 'afternoon' in main() is not...

    Right, the 'afternoon' in main() is not initialized. I think you meant to use 'char&' instead of 'char' on the parameter list for convert() (then convert() would initialize 'afternoon' for you). You...
  7. Replies
    1
    Views
    54,055

    I see this thread is almost a week old, but since...

    I see this thread is almost a week old, but since the OP may still have this problem and others may find this in a future search I hope no one blames me for necroposting here.

    I think your problem...
  8. Yes, that was my problem. I fixed that, and now...

    Yes, that was my problem. I fixed that, and now my code is working on GNU/Linux, SunOS, and MS Windows. Thanks!



    I'm getting a value from errno in my server_error() function, and no other...
  9. Thanks for the heads up on that behavior of...

    Thanks for the heads up on that behavior of sendto with buffers; time-permitting, I'll look into that myself and throw in a workaround for that.

    But on my GNU/Linux system, sendto() fails on the...
  10. sendto() Failing: errno = EINVAL on Linux, errno = 0 on SunOS

    I'm writing a simple UDP server, and right now as placeholder code I'm simply echoing back input. But sendto() is returning -1 and failing to send. On Debian GNU/Linux with GCC 4.4, this happens once...
  11. Replies
    9
    Views
    3,191

    That server is responding now, apparently. To...

    That server is responding now, apparently.

    To simply compile, run:
    $ gcc -Wall -o hello_world hello_world.c
    ("$" is the shell prompt; don't type it.) "-Wall" tells GCC to output all warnings,...
Results 1 to 11 of 11