Search:

Type: Posts; User: addle_brains

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    1,316

    I figured it out. When the server accepted a...

    I figured it out. When the server accepted a connection from a client, I hadn't WSAAsyncSelect() ed this new socket yet. I added this line and it works fine now.
  2. Replies
    17
    Views
    2,703

    Can you post the code of your structure...

    Can you post the code of your structure declaration and definition.
  3. Replies
    5
    Views
    1,316

    I tested the program running the server and...

    I tested the program running the server and clients from different computers, the problem still persists. I've followed everything properly (in terms of initialising winsock and everything) as far as...
  4. Replies
    5
    Views
    1,316

    Right, fixed that. Do you know why the message...

    Right, fixed that. Do you know why the message never gets sent to the client?
  5. Replies
    5
    Views
    1,316

    Winsock problems

    Hey guys, having a bit of a problem with Winsock in C++. I have a suspicion what the problem is but I thought I'd get a second opinion. I'm creating a simple chat program just to practice my windows...
  6. Replies
    1
    Views
    1,352

    ofstream - strange exit from program

    Hey, I'm currently looking into steganography and I decided to create a C++ program to hide a txt file in a bmp file as a little learning experience. All this code runs fine, my problem is occurs...
  7. Replies
    7
    Views
    1,535

    Cool, I think I'll just have a unix version and a...

    Cool, I think I'll just have a unix version and a windows version. Use whichever one is relevant.
  8. Replies
    7
    Views
    1,535

    Read in a character from cin without echoing it...

    Read in a character from cin without echoing it or waiting for eof.

    I have implemented it with conio.h, but i'd much rather an ANSI way if there is one.
  9. Replies
    7
    Views
    1,535

    system("-echo raw")

    Is there a real way of achieving this? I want to make the program more portable. If there isn't, what's the windows implementation?
  10. Replies
    32
    Views
    3,203

    Oh! is that what the random garbage was that...

    Oh! is that what the random garbage was that whole time? Because I hadn't specified what I wanted in that memory space yet?

    Edit: All fixed! :) It seems it was an issue with window line-endings...
  11. Replies
    32
    Views
    3,203

    I'm sorry, there's just quite a bit of code here...

    I'm sorry, there's just quite a bit of code here and I'm not quite sure how to explain how it all works. I'm sure you don't want me to post the entire program??? I've fixed the above algorith to work...
  12. Replies
    32
    Views
    3,203

    It gave me a bit of junk output.

    It gave me a bit of junk output.
  13. Replies
    32
    Views
    3,203

    Did you mean something like this? unsigned x...

    Did you mean something like this?


    unsigned x = 0;
    unsigned y = 0;

    while (in.get(passTo)) {
    terrainArray->Put(x, y, passTo);
    if (passTo == '\n') {
    y++;
  14. Replies
    32
    Views
    3,203

    It doesn't screw up the line output, but it does...

    It doesn't screw up the line output, but it does throw the 2d array off. If there aren't the same amount of characters in the file as there are in the array (longest line * number of lines) then it...
  15. Replies
    32
    Views
    3,203

    Well, it seems to output correctly, even if there...

    Well, it seems to output correctly, even if there are inconsistent line lengths. I think this is because of the nature of the Array2D class. The class basically created an array of size width *...
  16. Replies
    32
    Views
    3,203

    Hm, well, I fixed it. Not entirely sure but I...

    Hm, well, I fixed it. Not entirely sure but I think it's ok. I added 1 to the value of width. This caused the function to reprint the final character in the text file. So, as long as the text file...
  17. Replies
    32
    Views
    3,203

    Okay, wait, that's not what I want. It's output...

    Okay, wait, that's not what I want. It's output the file properly, just not the right amount of characters.
  18. Replies
    32
    Views
    3,203

    Thankyou!!!!!! That worked. Also I had to change...

    Thankyou!!!!!!
    That worked. Also I had to change that inbedded for loop part, because it didn't work.

    Is there a way to leave out line endings during get, because it's working, only the map is...
  19. Replies
    32
    Views
    3,203

    Okay, i've changed that to if (entry.size()...

    Okay, i've changed that to


    if (entry.size() > longFile.size()) {
    longFile = entry;
    }


    Regardless, that didn't fix the problem.
  20. Replies
    32
    Views
    3,203

    Ok. I managed to narrow it down where it's...

    Ok. I managed to narrow it down where it's happening to a constructor:



    #include <fstream>
    #include <string>
    #include <vector>
    #include <iostream>
    #include "terrain.h"
  21. Replies
    32
    Views
    3,203

    I may have figured it out. Is there a way to...

    I may have figured it out. Is there a way to reset the "read position" in a file so to the start?
  22. Replies
    32
    Views
    3,203

    I have tried to output data in some of the...

    I have tried to output data in some of the copying processes. It's not actually outputing anything.
  23. Replies
    32
    Views
    3,203

    Well, the function which draws the terrain onto...

    Well, the function which draws the terrain onto the screen takes a pointer to the screen class. I removed the pointer, and the output is different but still messed up. The problem is that I can think...
  24. Replies
    32
    Views
    3,203

    I was able to add debugging code to verify that...

    I was able to add debugging code to verify that the file is being read correctly. I tried adding a sort of std::cout << charBeingProcessed << std::endl; kind ok stuff. Nothing was output.
  25. Replies
    32
    Views
    3,203

    Weird Ouput

    Okay. I'm currently designing a small little "maze" game. Heading towards an ascii dungeon game, but keeping it simple for now. Simply, the program so far is meant to read in a text file containing...
Results 1 to 25 of 25