Search:

Type: Posts; User: c++.prog.newbie

Page 1 of 9 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    1,263

    well, i guess they dont need to global, now that...

    well, i guess they dont need to global, now that i think about i, i just need to pass them as references... and the NM nm(); was my mistake, it was just an example. I guess i shoulda put a bit more...
  2. Replies
    2
    Views
    1,263

    Class constructors

    im not sure how to word this but how do i do this




    class NM //create class
    ...

    NM nm(); //call default constructor
  3. Replies
    14
    Views
    4,512

    yes, thank you. i just realized what i was...

    yes, thank you. i just realized what i was trying to do, wouldnt work how i thought it would.
  4. Replies
    14
    Views
    4,512

    thank you again salem. EDIT: i seem to be...

    thank you again salem.

    EDIT: i seem to be having some problems with the mem* and str* functions... i have the following code:



    int size = strlen(message) + sizeof(int);
    char *buffer = new...
  5. Replies
    14
    Views
    4,512

    ok im having a few issues with this. I pack the...

    ok im having a few issues with this. I pack the message length and the message into the buffer and send it, the size of the message is 14. but when it gets to the other side and i read in the size...
  6. Replies
    14
    Views
    4,512

    ok, thanks for the help.

    ok,
    thanks for the help.
  7. Replies
    14
    Views
    4,512

    oh, i think i get it now. so on the recieving...

    oh, i think i get it now.

    so on the recieving end it would be something like...



    int messagesize;
    char* buffer;
    read(socket, messagesize, sizeof(int),0);
    read(socket, buffer,...
  8. Replies
    14
    Views
    4,512

    could you explain what you mean by that.

    could you explain what you mean by that.
  9. Replies
    14
    Views
    4,512

    the problem is im using UDP (its for a game) so...

    the problem is im using UDP (its for a game) so there is no guarantee that the size will arive before the message.

    EDIT: woops, i thought i posted it, but when i came here to look it wasnt there...
  10. Replies
    14
    Views
    4,512

    dynamic packet size.

    if i have a packet like so...


    struct PACKET
    {
    unsigned char message;
    unsigned short length;
    char* message;
    }
  11. sending and recieveing packets with dynamic size.

    if i have a packet like so



    struct PACKET
    {
    unsigned char command;
    unsigned short length;
    char* message;
    };
  12. it contains multiple files, all of which get...

    it contains multiple files,
    all of which get compiled,
    and yes its a new project in a new directory,
    its a new vc++ project not an old one,
    yes i have tried rebuild all, and it shows all of...
  13. ok, i reinstalled MSVC++ express 2005 and it...

    ok, i reinstalled MSVC++ express 2005 and it doesnt complain about not finding main, but it cant read a .lib that i need it to. where as MSVC++ 6.0 and Dev-C++ can. I also know that it is opening...
  14. im using it cause Dev was getting a little to...

    im using it cause Dev was getting a little to weak for what i need, and MSVC++ express 2005 didnt want to work for me... i tried multiple times... but i think i will have to try again :(

    EDIT: and...
  15. error about not finding main, when its there.

    ok, this program that i'm making worked just fine while using Dev-C++, and GCC, but when i moved it to MSVC++ 6.0 it says it cant find _main.

    Here is a more detailed error message:


    Linking......
  16. Replies
    6
    Views
    1,129

    i wanted to do it so that a class can access a...

    i wanted to do it so that a class can access a vector located in the main program, without having to pass it as a parameter for every function call.
  17. Replies
    6
    Views
    1,129

    pointers to vectors

    how would i make a pointer to a vector?

    thx
  18. Replies
    4
    Views
    14,708

    i dont know about the wifi part but here is about...

    i dont know about the wifi part but here is about the socket programming

    http://beej.us/guide/bgnet/output/html/index.html
  19. Replies
    7
    Views
    1,909

    :P i just realized i dont need to proto type the...

    :P i just realized i dont need to proto type the static function anywere :D...

    but that only solves one problem... the main one is still left


    Server.o(.text+0x2144): In function...
  20. Replies
    44
    Views
    2,924

    just read in until you get a newline character ...

    just read in until you get a newline character



    file.getline(array,maxsizeofarray,'\n');
  21. Replies
    7
    Views
    1,909

    if say i have a function static int test() in...

    if say i have a function
    static int test()
    in another file would i proto type it
    extern static int test()
    extern int test()
    or
    static int test()
    ?
  22. Replies
    2
    Views
    2,577

    :D ok i got that problem figured out, im still...

    :D ok i got that problem figured out, im still getting the error
    sendto: Invalid argument
    which is printed out using perror("sendto")...
    i tried entering the following code for debugging...
  23. Replies
    7
    Views
    1,909

    need assistance with multiple files

    ok i got two files, one has functions in it the other uses them, pretty simple right :D

    in one file i have this


    static void xtoa(unsigned long val, char *buf, unsigned int radix, int...
  24. Replies
    2
    Views
    2,577

    actually i got a different problem, how do i...

    actually i got a different problem,

    how do i get the address from a hostent* (h->h_addr) into a myaddr.sin_addr.s_addr ?
  25. Replies
    2
    Views
    2,577

    error using sendto

    when i use sento (UDP) in my program trying to send a mesg from one computer to the same one i get this error

    sendto: Can't assign requested address

    i tried 127.0.0.1 and the actual IP address...
Results 1 to 25 of 225
Page 1 of 9 1 2 3 4