Search:

Type: Posts; User: YocR

Search: Search took 0.01 seconds.

  1. Replies
    12
    Views
    440

    thanks again but since i don't put this in a...

    thanks again but since i don't put this in a function (as post #3 shows) there is no return for me to come up with.
    but if i wanna be sure, i can just compare str.size() against s.st_size.

    EDIT:...
  2. Replies
    12
    Views
    440

    yes sorry, i didn't mention any requirements. it...

    yes sorry, i didn't mention any requirements. it has to work everywhere so c++11 is not an option and exceptions are generally disabled via compiler option.

    anyway, my example from post #3 does...
  3. Replies
    12
    Views
    440

    move sounds like the best option. how would i...

    move sounds like the best option. how would i ensure a move?
  4. Replies
    12
    Views
    440

    oh i absolutely want to do that. this is such a...

    oh i absolutely want to do that. this is such a basic task, i'm still buffled (pun!) that there's no obvious way to do it.
    please do tell!
  5. Replies
    12
    Views
    440

    so there's indeed no way to read a file into a...

    so there's indeed no way to read a file into a string directly in c++ ?
  6. Replies
    12
    Views
    440

    yeah as a separate function which then requires a...

    yeah as a separate function which then requires a copy again. hence the string has everything and size() works. but try it directly:



    #include <cstdio>
    #include <fstream>
    #include <string>...
  7. Replies
    12
    Views
    440

    read full file to string in one go

    as a casual c++ user i recently stumbled upon a problem, which i didn't expect to be one at all. something as trivial as reading a file at once turned out to be not so trivial after all in c++.

    in...
  8. Replies
    4
    Views
    1,611

    thanks again and indeed select() pretty much...

    thanks again and indeed select() pretty much worked as i hoped for. what you added further is even a bit too advanced for what i need but is neat of course and i'll keep it in mind :)
  9. Replies
    4
    Views
    1,611

    much thanks for the reply. unfortunately i can't...

    much thanks for the reply.
    unfortunately i can't go into great detail about the program itself however i'll try to describe it more precisely.

    the basic program was a client connecting to a...
  10. Replies
    4
    Views
    1,611

    C / Unix: client program with listeninig socket

    sorry for the dupe but the other thread (http://cboard.cprogramming.com/networking-device-communication/109633-server-client-same-program.html) was locked. anyway it's not exactly the same situation...
Results 1 to 10 of 10