Search:

Type: Posts; User: Homunculus

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    1,337

    Thanks for the help =). I really was over...

    Thanks for the help =). I really was over thinking it.
  2. Replies
    10
    Views
    1,337

    Already did that. It works. The problem is after...

    Already did that. It works. The problem is after I sort values[] I will lose the information on which byte had that particular frequency. I could then make the array 2d where I store in...
  3. Replies
    10
    Views
    1,337

    Write now I am writing code to do Huffman-Coding....

    Write now I am writing code to do Huffman-Coding. It's more of a programming exercise for myself since I haven't done any in a long time. I understand with just 256 values (maximum) performance is...
  4. Replies
    10
    Views
    1,337

    Which data structure would be best?

    I have a list of 256 numbers that can range in value up to 256. Each of these numbers are associated to another value so I thought std;:map would be great until I realized there is no function for...
  5. Replies
    2
    Views
    846

    Singleton Problem

    I want to make a generic singleton class which I can create a is-a relationship with.

    Looking around a bit I found something like this:



    template <class T> Singleton{

    protected:
  6. Replies
    5
    Views
    857

    I don't care so much about getting it to work as...

    I don't care so much about getting it to work as understanding why it doesn't work. What exactly is wrong about it? I don't see it.
  7. Replies
    5
    Views
    857

    I'm thinking it might be something here that is...

    I'm thinking it might be something here that is the problem. Depending on the way I initialize stuff I am getting different results and I'm not sure why. I simply hardcoded a tree to test it.



    ...
  8. Replies
    5
    Views
    857

    Probably a pointer problem

    Just messing around and refreshing on C++ and I happen to run into a little problem.




    template <class T> class TraverseTree{
    public:
    TraverseTree();
    ~TraverseTree();
  9. Replies
    4
    Views
    2,229

    OpenGL Transformations

    I've managed to load an image and texture map it. I am now trying to rotate this object. When I rotate it, it looks funny and I'm not sure why.

    Here are the relevant lines of code:



    void...
  10. Replies
    5
    Views
    1,294

    It's in the same file.

    It's in the same file.
  11. Replies
    5
    Views
    1,294

    struct error

    I get the following errors when I try to compile:

    thread.c: In function ‘peerFunc’:
    thread.c:102:2: error: ‘PeerArgs’ undeclared (first use in this function)
    thread.c:102:2: note: each...
  12. Replies
    4
    Views
    948

    So, if my server turns off the connection...

    So, if my server turns off the connection properly while the client is currently blocking on recv, recv will return 0? but if the connection were to just suddenly terminate it returns -1? I've been...
  13. Replies
    4
    Views
    948

    question about recv()

    So, I wrote a small server program where when I run it I specify a file in the command line arguments... then when a client connects to that server the server starts sending the file to the client.
    ...
  14. Replies
    0
    Views
    674

    socket question

    I'm learning socket programming in C. I'm learning from beej's guide at the moment but I wrote a program to display ip's but when I did it, it displayed each 3 times. I'm not sure why... but then I...
  15. Replies
    6
    Views
    1,157

    I did... then changed it to input[0]=0

    I did... then changed it to input[0]=0
  16. Replies
    6
    Views
    1,157

    I'm not trying to concatenate strings via the +...

    I'm not trying to concatenate strings via the + operator... I was just describing the expected outputed from some of the debugging I was doing. Basically it works normally except for that exact...
  17. Replies
    6
    Views
    1,157

    Well, I have a bizarre error. It works now except...

    Well, I have a bizarre error. It works now except that it prints out "Input:" twice. I tried putting a previous printf() call before that one to see if it would print "Input"+"mynewprintfmsg"+"Input"...
  18. Replies
    6
    Views
    1,157

    i/o error checking question

    I want to know how I can check if a message was too long and truncated or what when I read in a string. If I do:

    fgets(iname,MAX_NLEN,stdin);

    or something similar it just truncates my string...
  19. Replies
    1
    Views
    1,348

    Probably a stupid question

    Will programs built with win32 api run on 64bit windows too?
  20. Replies
    19
    Views
    4,581

    Yeah, I think you're right. After having troubles...

    Yeah, I think you're right. After having troubles loading in my bitmap data, I went and checked out what you were saying:



    cout << fHeader.bfType << endl;
    cout << fHeader.bfSize <<...
  21. Replies
    19
    Views
    4,581

    I figured it out. Turned out by fileheader and...

    I figured it out. Turned out by fileheader and infoheader were both 2 bytes too big for some reason, so I changed

    fread(&fHeader,sizeof(FILEHEADER),1,fp) to...
  22. Replies
    19
    Views
    4,581

    Loading a bitmap

    I'm trying to load a bitmap and getting weird results when checking what I've loaded into my structures. First I'll show my code:



    #include <iostream>
    #include <stdio.h>
    #include <stdlib.h>
    ...
  23. Replies
    1
    Views
    5,523

    Shunting yard algorithm.

    I am trying to implement the shunting yard algorithm for a graphing calculator that I'd like to make. I've managed before to get it to solve basic equations that don't use braces, or trigonometric...
  24. Replies
    1
    Views
    927

    creating a terminal

    This shouldn't be to hard, atleast I wouldn't think. I created new project of type Win32 Consol... thing is, I can't do anything that I wanted to do to make it look nice. Such as...
  25. Replies
    4
    Views
    1,412

    ok =P, I was just thinking more than one tutorial...

    ok =P, I was just thinking more than one tutorial would be necessary... I do have some questions.. I use dev-cpp and when i try to compile there example source I get a whole bunch of Linker Errors....
Results 1 to 25 of 71
Page 1 of 3 1 2 3