Search:

Type: Posts; User: Seron

Page 1 of 2 1 2

Search: Search took 0.01 seconds; generated 48 minute(s) ago.

  1. Replies
    4
    Views
    6,370

    many thanks to you all

    many thanks to you all
  2. Replies
    4
    Views
    6,370

    write to .txt file in columns

    How could I write to a text file so that it appears in column format? This is for a .log file.

    It should look something like this:



    <date> <address> <file>...
  3. Thread: socket and time

    by Seron
    Replies
    3
    Views
    1,064

    Thanks for your help. I still get a strange date...

    Thanks for your help. I still get a strange date and time. This part of the code now looks like this:


    recv(sock, &time, 4, 0);
    time = ntohl(time);
    tsp = ctime(&time);

    printf("%s\n", tsp);
  4. Thread: socket and time

    by Seron
    Replies
    3
    Views
    1,064

    Thanks for the quick replies. I've got the...

    Thanks for the quick replies.

    I've got the right format now for the time, but it is not showing the correct time, unless that is what the server sends me.

    more questions:

    1) How could I...
  5. Thread: socket and time

    by Seron
    Replies
    3
    Views
    1,064

    socket and time

    Hi,

    I'm working on a small school assignment where I should make my program on a Solaris that connects to a server with TCP and gets a 32-bit integer that contains the time which should then be...
  6. Have a look here:...

    Have a look here: http://www.doc.ic.ac.uk/~wjk/C++Intro/RobMillerL7.html#S7-5 It explains in a good way how linked lists work and has got illustrations. This site helped me to understand the concept....
  7. Replies
    5
    Views
    1,029

    When you create a variable it will always have a...

    When you create a variable it will always have a memory address allocated for it, even if you don't initialize it. The contents of that variable will in that case be unpredictable i.e. garbage. I...
  8. Thread: borland 5.5

    by Seron
    Replies
    2
    Views
    949

    If you've appended the path as described in the...

    If you've appended the path as described in the readme.txt you can compile in any directory. Just put your .cpp file in any directory and run the compiler from there. Then the .exe will be in that...
  9. Replies
    4
    Views
    1,094

    How about prefixing a 0 if int / 10 < 1 ?

    How about prefixing a 0 if int / 10 < 1 ?
  10. Replies
    8
    Views
    1,669

    You include it in the same way as a header file....

    You include it in the same way as a header file. In the main.cpp file add #include "yourfile.cpp" .

    In that .cpp file usually goes the implementation of whatever you've declared in the header,...
  11. Replies
    2
    Views
    1,036

    Confused about nested structs/classes

    Look at the code below. When the Hen object is created, is a Nest and Egg created inside of it? Or are the structs independent apart from scope? It seems to be so when it is allowed to create an Egg...
  12. Replies
    7
    Views
    1,946

    Did you make the additions to the environment...

    Did you make the additions to the environment search path and create the .cfg files as is written in the readme.txt? I believe that you can choose to include or not include the .h . Both should work....
  13. Replies
    4
    Views
    1,041

    Have a look at this one. It helped me a lot to...

    Have a look at this one. It helped me a lot to understand linked lists.

    http://www.doc.ic.ac.uk/~wjk/C++Intro/RobMillerL7.html#S7-5

    Seron
  14. Thread: help

    by Seron
    Replies
    9
    Views
    1,011

    Is your program a console program that prints...

    Is your program a console program that prints more information than can fit on the screen?Then you can also use the MORE switch to pause the screen output after one page.

    It is used like this:
    ...
  15. Replies
    7
    Views
    1,610

    Sorensen wrote: Ok, but how would I display...

    Sorensen wrote:


    Ok, but how would I display those addresses? I've tried the below code and it doesn't work.


    #include <iostream>
    using namespace std;

    void main() {
  16. Replies
    7
    Views
    1,610

    Thanks for the answers guys. Bubba wrote: ...

    Thanks for the answers guys.

    Bubba wrote:

    How does the program know not to read any more characters from memory?


    zMan wrote:

    I believe this works in exactly the same way as Bubba's...
  17. Replies
    7
    Views
    1,610

    char* behaves strangely

    Hello,

    I've cast the address of a string to a char* . I expected to be able to use the pointer in the same way as other types, but it behaves quite differently. Could someone explain what is going...
  18. Replies
    0
    Views
    1,457

    Code structure of this program I made.

    Hi,

    I made a program for an exercise that is in a book I use to teach myself C++.

    The code works, but I would be grateful if someone could have a look and write something about the structure of...
  19. Thread: C++ editor

    by Seron
    Replies
    6
    Views
    1,891

    Thanks for all the answers

    Many thanks for all the answers. Code-genie seems to be just what I was looking for.

    Vim appears to be cool too, now that I've learnt to read the text on the screen :) . It even has a built in...
  20. Thread: C++ editor

    by Seron
    Replies
    6
    Views
    1,891

    C++ editor

    Hello,

    Which editor would you suggest to use for C++ coding? I'm using the free Borland 5.5 compiler with Notepad at this time. Is there an editor that recognises C++ keywords and colourcodes them...
  21. Thread: Is this a cast?

    by Seron
    Replies
    1
    Views
    925

    My book says something to the effect that...

    My book says something to the effect that parentheses around the type or around the variable are equivalent and inherited from C. C++ includes the more explicit cast form static_cast<float> and is...
  22. Thread: cout << double

    by Seron
    Replies
    2
    Views
    4,758

    aaaha, Thanks man!

    aaaha,
    Thanks man!
  23. Thread: cout << double

    by Seron
    Replies
    2
    Views
    4,758

    cout

    Hi,

    When I use cout to print a double it only shows the first few digits of the mantissa. Why is that? How could I make it print the whole thing?

    Seron
  24. Replies
    2
    Views
    1,030

    #define from the command line

    Can #define and #undef flags be used from the Borland compiler command line?

    Seron
  25. Replies
    4
    Views
    1,453

    Thank you zMan. One more question. Why is...

    Thank you zMan.

    One more question. Why is Mickey < Pluto ?

    Seron
Results 1 to 25 of 32
Page 1 of 2 1 2