Search:

Type: Posts; User: aosmith

Search: Search took 0.00 seconds.

  1. Thread: static structs

    by aosmith
    Replies
    3
    Views
    5,160

    Thanks Quzah, ... I'm not sure what happened...

    Thanks Quzah,

    ... I'm not sure what happened with the top code box (I assume you're talking about the fact that it scrolls), I guess I shouldn't have used the indent tag inside of a code tag......
  2. Replies
    4
    Views
    1,680

    put your code in a for loop like this: ...

    put your code in a for loop like this:




    for(;;)
    {

    //input, output etc.
    }
  3. Thread: static structs

    by aosmith
    Replies
    3
    Views
    5,160

    static structs

    Just a random question about static structs

    for example:



    static struct info
    {
    double number;
    };
  4. Replies
    9
    Views
    1,065

    wow so fast...

    wow so fast...
  5. Replies
    4
    Views
    44,956

    MrAmazing and Vart - Thanks for the responses. ...

    MrAmazing and Vart - Thanks for the responses.

    I caught the sprintf while debugging:


    sprintf(request, "GET %s HTTP/1.0\r\nHOST:%s \r\n", &(*argv[1]) + (tok - &(*argv[1])), host);

    That...
  6. Replies
    4
    Views
    44,956

    HTTP GET request

    From my knowledge of HTTP sending a get request via HTTP with c (I'm only worried about get) should just be sending a packet containing something like GET <filename> HTTP/1.0 ... I've been trying to...
  7. Replies
    3
    Views
    13,306

    Here's something I wrote for a class a while...

    Here's something I wrote for a class a while back:


    Client:


    #include "userPanel.h"

    int main (int argc, const char * argv[]) {
    if (argc < 3)
  8. Replies
    14
    Views
    2,877

    I know there's only one main(), I switched...

    I know there's only one main(), I switched between Mac and Windows in the middle (slightly different file names)

    Includes should look like this:
    main.cpp(whatever file contains main()):...
  9. Replies
    14
    Views
    2,877

    (switched to mac in the middle) main.cpp: ...

    (switched to mac in the middle)

    main.cpp:


    #include <iostream>
    #include "Book.h"
    #include "ISBN.h"
  10. Replies
    14
    Views
    2,877

    Thanks for the advice, added inclusion gaurds...

    Thanks for the advice, added inclusion gaurds
    now it looks something like this:

    main --> Book.h --> Book.cpp

    but now all the elements in the .cpp are not declared and/or are invalid... Did I...
  11. Replies
    14
    Views
    2,877

    How do you guys suggest I rearrange includes? ...

    How do you guys suggest I rearrange includes? I'm working on it right now but without much luck... TIA
  12. Replies
    14
    Views
    2,877

    I thought that looked weird (it's the way VS...

    I thought that looked weird (it's the way VS setup)... and the ISBN is only 11 because the check (last number) and dash are added on later.
  13. Replies
    14
    Views
    2,877

    Linker error (?)

    I'm thinking this is a problem with pre-compiled headers is VS...

    Errors:


    1>------ Build started: Project: 5.3, Configuration: Debug Win32 ------
    1>Compiling...
    1>ISBN.cpp
    1>Book.cpp...
  14. Thread: Strings

    by aosmith
    Replies
    7
    Views
    1,395

    is there a reason you're using %11s instead of...

    is there a reason you're using %11s instead of just %s?
  15. Thread: bind() error

    by aosmith
    Replies
    2
    Views
    3,909

    I figured that out shortly after posting, and a...

    I figured that out shortly after posting, and a little banging my head against the wall.

    Thanks!
  16. Thread: Hanging code:

    by aosmith
    Replies
    2
    Views
    1,258

    Hanging code:

    this code hangs at line:


    if (connect(serverSocket, (struct sockaddr *) &serverAddr, sizeof(serverAddr)) < 0)

    complete code:


    #include <stdio.h>
    #include <string.h>
  17. Thread: bind() error

    by aosmith
    Replies
    2
    Views
    3,909

    bind() error

    Hey guys,
    I'm not sure if this is something wrong with xCode or my code itself (or perhaps a permissions issue in mac os x). Anyways my code looks like this:


    #include <stdio.h>
    #include...
Results 1 to 17 of 17