Search:

Type: Posts; User: 39ster

Page 1 of 9 1 2 3 4

Search: Search took 0.01 seconds.

  1. DLL, Load functions/static variables from host

    Hello,

    So i know how to make the host load the functions from a DLL file, but how would I go about exposing the host's functions/classes/static members to the DLL, so the DLL can control the host?
  2. Replies
    9
    Views
    9,965

    Using std::vector as a "memory stream"

    Would it be a good idea to use std::vector as a fast memory stream class?


    std::vector<char> memoryStream;


    Just wondering if the performance of this class would be sufficient as a generic...
  3. Replies
    3
    Views
    3,916

    I suppose i could. Anyways a little bit more...

    I suppose i could. Anyways a little bit more looking around and i found out that variable arguments are alot more restrictive than i thought. I thought the program would pass "int num" but it turns...
  4. Replies
    3
    Views
    3,916

    Functions with variable argument count..

    I'm wondering if there is a way to deal with functions that can have a variable number of arguments passed to it. I already know of va_* functions but it doesn't seem that good. I was hoping there...
  5. Replies
    7
    Views
    2,423

    You could of just done: char welcome[] =...

    You could of just done:


    char welcome[] = "GET /about/sites.html HTTP/1.1\r\n"
    "Host: www.craigslist.org\r\n"
    "Connection: close\r\n"
    "\r\n";
  6. Thread: Help! Http

    by 39ster
    Replies
    5
    Views
    1,451

    Extra bytes at the top of the file? If that's the...

    Extra bytes at the top of the file? If that's the case then that is part of the header. It's probably a blank line which means end of header.
  7. Replies
    18
    Views
    3,751

    Yeah i was just thinking about using a map.

    Yeah i was just thinking about using a map.
  8. Replies
    18
    Views
    3,751

    If i use a vector or list it's going to screw up...

    If i use a vector or list it's going to screw up the item placement. I want them to be able to choose which position to put the item. They can place the item in the 8th position even if they only...
  9. Replies
    18
    Views
    3,751

    Well it's part of their inventory: class...

    Well it's part of their inventory:


    class Player:
    public Character
    {
    private:
    ...
    Item items[9];
    ...
  10. Replies
    8
    Views
    1,292

    I'm pretty sure turning the precompiler off would...

    I'm pretty sure turning the precompiler off would break everything. It's pretty much essential.
  11. Replies
    8
    Views
    1,292

    The precompiler changes GetClassName to...

    The precompiler changes GetClassName to GetClassNameA.


    const std::string& className = items[i].GetItemClass()->GetClassName();



    Same with all the other words winuser.h defines
  12. Replies
    8
    Views
    1,292

    Stupid windows...

    Somewhere within my code (i think maybe the SDL or opengl library) i'm including windows.h and this stupid file has a crap load of reserved words! I've already come across three function names i've...
  13. Replies
    18
    Views
    3,751

    Thank you.

    Thank you.
  14. Replies
    18
    Views
    3,751

    Overload the..bool operator..?

    I want to use a class like this:


    Item item;

    if(item)
    {
    ....
    }
  15. Ok i figured out the answer for both questions....

    Ok i figured out the answer for both questions. You can only initialize the value in the class header if it's an integer.
  16. Hmm, should be able to use anonymous...

    Hmm, should be able to use anonymous structures...?

    A different problem. For some reason i get "obj\Release\src\Player.o:Player.cpp:(.text+0x144): undefined reference to `Player::JUMP_HEIGHT'...
  17. Replies
    6
    Views
    2,082

    For classes that have dynamic memory. class...

    For classes that have dynamic memory.


    class string
    {
    private:
    char* data;
    size_t len;
    }; If you let the compiler create a default copy constructor then it will copy the pointer for data...
  18. How do i do this? (static structure inside class)

    I get errors when i try this:


    class Player:
    public Character
    {
    private:
    static const float JUMP_HEIGHT = 13;
    static const int REGEN_DELAY = 100;
    static const int...
  19. Thread: pointers

    by 39ster
    Replies
    1
    Views
    17,273

    To change the value of a pointer you do this: ...

    To change the value of a pointer you do this:

    *day = 44;

    Example:


    int dateSplit(int dayOfYear, int year, int *day, int *month)
    {
    ...
  20. Replies
    5
    Views
    2,523

    From gamedev.net:

    From gamedev.net:
  21. Replies
    11
    Views
    2,229

    Just try "c:\\Cliffhanger". It's already been...

    Just try "c:\\Cliffhanger". It's already been explained why you need two backslashes.
  22. Replies
    2
    Views
    1,038

    I don't see any floats or pointers in your...

    I don't see any floats or pointers in your code...

    I don't really get your question but maybe you want this: http://cboard.cprogramming.com/showthread.php?t=107099

    EDIT: You also need to remove...
  23. Replies
    2
    Views
    4,945

    You can use binary operators. int val = 64;...

    You can use binary operators.
    int val = 64;

    int i;
    for(i = 7; i >= 0; --i)
    printf("&#37;d", (val & (1 << i)) > 0);

    This will print 8 bits of the value. If you want to print...
  24. Replies
    8
    Views
    1,768

    Just do this: void ChangeString(char*...

    Just do this:


    void ChangeString(char* outStr, size_t outSize);
    int main()
    {
    char myString[0xFF] = "";
    ChangeString(myString, sizeof(myString));
    printf("&#37;s\n", myString);
    return 0;
  25. Replies
    5
    Views
    2,577

    I think you can only use templates in header...

    I think you can only use templates in header files..
Results 1 to 25 of 225
Page 1 of 9 1 2 3 4