Search:

Type: Posts; User: screennameless

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    3,399

    I figured it out. Apparently Allegro likes to...

    I figured it out.

    Apparently Allegro likes to take over the main() function, so it got confused when it didn't see one. I added


    #define ALLEGRO_NO_MAGIC_MAIN


    to the top of the main...
  2. Replies
    4
    Views
    3,399

    I moved all the source files out of the old...

    I moved all the source files out of the old solution/project and created a new empty DLL project, imported the sources, and linked the Allegro library again. Still got the same error.
    Just tried...
  3. Replies
    4
    Views
    3,399

    Update: I found a setting that marks /NOENTRY,...

    Update:

    I found a setting that marks /NOENTRY, selected it, and tried to recompile with no success. Same error.
  4. Replies
    4
    Views
    3,399

    Visual C++: LNK4086

    I'm trying to create a DLL within Visual C++. The classes all used to be part of a "test program" with a main.cpp but now I am trying to move them to their own DLL and then have main.cpp reference...
  5. Accessing my server from any other machine

    I've been working with socket programming lately; and I'm currently making a server that listens on a port for incoming connections, then once it gets one, reads in a string and places it in a file....
  6. Accessing my server from any other machine

    Thread moved here.
  7. Ohh, haha, I didn't think of changing the...

    Ohh, haha, I didn't think of changing the compare() function. Thanks!
  8. Hmm. Well, the only way I can imagine using this...

    Hmm. Well, the only way I can imagine using this is as a replacement to push_back(), by using resize() and then at() to assign it.
    Is this what you had in mind?
  9. Ahh, I see. Well, thank you then, I will do this....

    Ahh, I see. Well, thank you then, I will do this. :)
    Memory management is not really my forté, I'm still a beginner!
  10. Hmm, does this provide any advantages?

    Hmm, does this provide any advantages?
  11. Thanks everyone. I've decided against using at()...

    Thanks everyone. I've decided against using at() because it's a passive parser. It shouldn't throw an exception if it doesn't equal something, it should only move on to the next combination of chunks...
  12. If you mean vector::size, then thank you! I'm not...

    If you mean vector::size, then thank you! I'm not quite sure how I missed that. :D
  13. Comparing a string that might not exist?

    I'm writing a parser that gets a line from a file and separates it (by spaces) into a string vector. Unfortunately there's no way to know how long the string will be. And to figure out what the...
  14. Alright, alright. Thank you everyone. I won't...

    Alright, alright. Thank you everyone. I won't allocate on the heap. I was simply trying to ensure that I am not, for example, allocating a string on the stack until it gets long, and then having it...
  15. Ah, thank you for pointing that out. The loop...

    Ah, thank you for pointing that out. The loop used to be a while() loop.


    So, you're saying that strings are on the heap most of the time anyway?
  16. I understand that they grow in the stack. But...

    I understand that they grow in the stack. But "line" has the potential to be very long. I don't want it to be the cause, or to help cause a stack overflow in the future.


    Because I'm sticking to...
  17. Segmentation fault when comparing dynamic string to literal

    I dynamically allocated string "line" because I don't know how large it will get to be.
    I can assign data to line just fine, however, when I try to scan for spaces in the string, it causes a...
  18. Okay. The function now is able to read a line...

    Okay. The function now is able to read a line from config, and return it to the caller.
    The problem now, is that it always returns the first line of configuration.

    The config file looks like...
  19. Okay. So I have the function set to realloc...

    Okay. So I have the function set to realloc "value" to the size of the string to be returned.

    Back to main; if I declare the pointer as:

    char *blah = getconf(false,"test");
    will it...
  20. Now, when you say prompting for the size of the...

    Now, when you say prompting for the size of the input, does that mean I can wait and allocate based on how big the final variable needs to be?

    For example, getconf gets a setting which equals...
  21. Thanks for your reply! Would my pointers have to...

    Thanks for your reply!
    Would my pointers have to point to a char array? Or should I use malloc()?

    These things always confuse me, no matter how many tutorials I read...
  22. I see. But why does char *blah; work in main?

    I see. But why does

    char *blah;
    work in main?
  23. Function for getting configuration causes segfault

    I'm sort of a self-taught beginner programmer here. One thing I always tried to avoid was pointers. After this last project, I figured I had to start learning them, as well as improving what other...
Results 1 to 23 of 24