Search:

Type: Posts; User: Zlatko

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Yes it does seem to do the job but it replaces...

    Yes it does seem to do the job but it replaces multiple spaces at the end with one space, and removes all spaces at the beginning. Its a little asymmetrical. Is that what you wanted?

    I see you...
  2. You almost have it but it has trouble with...

    You almost have it but it has trouble with leading spaces. Try stepping through with a debugger if you know how to do that. Otherwise, use pencil and paper to step through the code.

    Check your...
  3. Replies
    3
    Views
    1,680

    Hello Brian. What an interesting question!...

    Hello Brian.

    What an interesting question!
    The problem with the logic is that in your nested loops, each loop wont execute unless you have at least enough money to have one coin of a...
  4. I think your logic of i2 needs to be abandoned....

    I think your logic of i2 needs to be abandoned. Notice that i2 is always incrementing when you have 2 consecutive spaces, and then tempString is being assigned userString[i+i2] as if you know that...
  5. Your code in the loop for(i; i < size; ++i)...

    Your code in the loop


    for(i; i < size; ++i)
    {
    if((userString[i] != ' ') && (userString[i-1] != ' '))
    {
    tempString[i] = userString[i];
    }
    if((userString[i] == ' ') &&...
  6. Perhaps you don't need to remove it at all. You...

    Perhaps you don't need to remove it at all. You could have a flag in your structure to indicate that a book is in or out of the library instead of moving things around.

    The books don't seem to be...
  7. Thread: i=i++

    by Zlatko
    Replies
    13
    Views
    2,922

    i=i++

    I came across the code i=i++ today. It does increment i, but it surprised me. If post-increment is supposed to return the old value, why is the old value not assigned back to i ? I expected the line...
  8. Replies
    7
    Views
    7,497

    Hardy, I'll look at it in the next few days. Post...

    Hardy, I'll look at it in the next few days. Post the client too. Generally you want to make it as easy as possible for people that are helping you.

    Edit.

    I cannot tell from looking at the code...
  9. Replies
    7
    Views
    7,497

    You don't need to worry about that. The OS will...

    You don't need to worry about that. The OS will take care of it and I'm not sure how to get the port number assigned by the OS to the client.

    Every connection from client to server results in a...
  10. Replies
    7
    Views
    7,497

    Having both clients on the same machine does not...

    Having both clients on the same machine does not matter.

    If your server does not take long to process a client request, then consider servicing multiple clients with the select function, instead...
  11. Replies
    7
    Views
    7,497

    Hello Hardy. You should post the server and...

    Hello Hardy.
    You should post the server and client code so that people can have a look. If you can post a minimal version of client and server that exhibit the same problem, that would be even...
  12. Replies
    1
    Views
    1,468

    zilot, if I understand correctly you want your...

    zilot, if I understand correctly you want your program to go through your current folder and subfolders recursively. It's not doing that because you cannot reuse a handle from one folder in another....
  13. Replies
    4
    Views
    1,527

    Hey MadBoat, the pulseDigits is the new width of...

    Hey MadBoat, the pulseDigits is the new width of your text field. You need to slide the label to the right by the change in the width, not the width.



    int pulseDigits = 32;
    CRect * calcR = new...
  14. The ANDing with 0xFF is not actually necessary,...

    The ANDing with 0xFF is not actually necessary, it's just my habit. I'll show you another way to do it too, and you can choose based on your style.

    The netLen is a short, so it takes up 2 bytes,...
  15. Replies
    6
    Views
    1,393

    Thanks. Are the languages diverging so that C...

    Thanks.
    Are the languages diverging so that C may end up with features not in C++?
  16. Replies
    5
    Views
    1,608

    Adam: One source of memory corruption is that...

    Adam:
    One source of memory corruption is that you've copied OCTree.h into OCTree.cpp and then changed struct OCTreeNode. In OCTree.h, OCTreeNode has int* polys. In OCTree.cpp, it has int polys[50]....
  17. Replies
    6
    Views
    1,393

    Is this standard?

    This is a new one for me. Visual Studio 2008 does not accept creating an array with a non-const size, but g++ (3.4.4 on cygwin) accepts it. Is Microsoft behind the standard?



    #include...
  18. Thread: help

    by Zlatko
    Replies
    6
    Views
    1,158

    Hey check out the video lectures at Academic...

    Hey check out the video lectures at
    Academic Earth - Computer Science II: Programming Abstractions
    and the course web site at
    CS106B: Programming Abstractions
    Plenty of information and practice...
  19. Replies
    5
    Views
    1,608

    Adam, the files in the last post don't compile. ...

    Adam, the files in the last post don't compile.



    1>Compiling...
    1>main.cpp
    1>octree\main.cpp(15) : error C2039: 'getTriangleList' : is not a member of 'C3DWorld'
    1> ...
  20. Replies
    3
    Views
    1,432

    James, if the files just need to be displayed on...

    James, if the files just need to be displayed on the screen, then all you need to do is open the file with fopen, read in lines with fgets, until the end of the file, and print each line out after...
  21. Replies
    3
    Views
    1,432

    James, you need to provide a bit more...

    James, you need to provide a bit more information. What is in your input file? What should the output look like? What is a wordsquare?

    Sure you need to store your file input into something if you...
  22. Replies
    5
    Views
    1,608

    Adam, if you provide me with a main program that...

    Adam, if you provide me with a main program that creates the octree and reproduces the problem, I'll try to debug it. I need to be able to compile it, so I need VECTOR, TRIANGLE, and CVec3 (as far as...
  23. Replies
    3
    Views
    2,339

    I would suggest you initialize found to false...

    I would suggest you initialize found to false before calling search. If search fails, found will have a garbage value, and very probably will not be false.
  24. Thread: help

    by Zlatko
    Replies
    6
    Views
    1,158

    Read books about programming and object oriented...

    Read books about programming and object oriented design. Try the book "Beautiful Code" at
    Beautiful Code | O'Reilly Media . That book will mention other books to follow up on.

    Write programs....
  25. Hello. This should get you started. /*...

    Hello.

    This should get you started.


    /* Assuming that the length of your messages fits into a short */

    void writer(void)
    {
    /* Determine message and length (len) of message */
Results 1 to 25 of 133
Page 1 of 6 1 2 3 4