Search:

Type: Posts; User: Ganoosh

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    1,704

    Password dialog question

    Basically, I'm trying to create a password dialog in C++ for window. This may seem like a lot to ask, but I'm a total noob when it comes to windows programming other than a simple window with a...
  2. Replies
    6
    Views
    1,128

    But wouldn't just just delete ptr1 because it's...

    But wouldn't just just delete ptr1 because it's also a pointer? Or does the compiler know to delete ptr2 because ptr1 wasn't allocated with new?
  3. Replies
    6
    Views
    1,128

    Refresh me.. Double pointer's question

    I haven't coded in a while, months. Anyway I'm back and I need a little refresher.

    If I have 2 pointers:
    Type* ptr1;
    Type* ptr2;

    and set ptr2 using new, and set ptr1 to point to ptr2, how do...
  4. Thread: Tricking enums

    by Ganoosh
    Replies
    3
    Views
    1,207

    Tricking enums

    I'm sure there's got to be a way to do this. Is there some way to trick the compiler into allowing a redefinition of an enum. For example say you have:

    enum type {};
    and then you want to define...
  5. Replies
    5
    Views
    1,207

    Initializer lists, better or worse?

    Which would be faster and more efficient, using an initializer list, or setting variables the traditional way (this->x = x or memberX = paramX etc)?
  6. Replies
    5
    Views
    1,625

    Hmm.. so would I put: extern Window*...

    Hmm.. so would I put:


    extern Window* gwindow;
    extern Settings* gsettings;

    at the beginning of each file I include the header? It still does the same thing.
  7. Replies
    5
    Views
    1,625

    Multiple definitions?

    In a program I'm working on, I have a header file which defines some structs. In that same header file I have 2 pointers:


    Window* gwindow; // global pointer to core Window obj
    Settings*...
  8. Replies
    4
    Views
    2,679

    Yeah I'm avoiding windows dependencies because i...

    Yeah I'm avoiding windows dependencies because i wanna make a whole image loader to support multiple filetypes that I'm also gonna use on linux. Anyway, I'll try that and see what happens, thanks.
  9. Replies
    11
    Views
    2,419

    You mean like using the clipboard?

    You mean like using the clipboard?
  10. Replies
    7
    Views
    1,230

    template class LinkedList { ...

    template <class obj_type> class LinkedList {
    struct LLNode {
    obj_type value;
    LLNode* next;
    };
    public:
    LinkedList();
    ~LinkedList();
    ...
  11. Replies
    7
    Views
    1,230

    I made a nice little linked list class a while...

    I made a nice little linked list class a while ago if you want the code I can post it for you. It uses structs and a class, and also templates if you don't understand them yet maybe I should off,...
  12. Replies
    4
    Views
    2,679

    Loading a bmp file

    I'm having trouble with this one, as easy as the format is, I'm doing something wrong. I have a function here to load a bmp file, taking the filename:


    LIMAGE BMPLoader::loadBMP(const char*...
  13. Replies
    6
    Views
    1,100

    Yes it is actually, but I copied the same code to...

    Yes it is actually, but I copied the same code to the main cpp and it worked perfectly fine. For some reason the folders just mess it up or something. But I'm gonna try putting it in a...
  14. Replies
    6
    Views
    1,100

    Sorry for the late reply, been busy and haven't...

    Sorry for the late reply, been busy and haven't had time to check this. Here's the function, LIMAGE is a struct that contains width, height, type and a char* to hold image data.


    LIMAGE...
  15. Replies
    6
    Views
    1,100

    Problems opening file

    I'm having a problem opening a file and I'm thinking it's because of directories or something. I'm working on an image loader and i have a file test.bmp, but whenever I call the function, it fails...
  16. Replies
    10
    Views
    1,856

    The STL, all kinds of little additions, I think...

    The STL, all kinds of little additions, I think new and delete are new to C++ or do they work in C?
  17. Replies
    6
    Views
    1,199

    char temp[arg.length()]; strcpy(temp,...

    char temp[arg.length()];
    strcpy(temp, arg.c_str());
    strcpy(settings->profile.name, temp);

    If I try to copy temp into settings->profile.name, Windows gives me the old, this program has caused an...
  18. Replies
    6
    Views
    1,199

    Copying data to char* out of function

    Ok, the problem is I have a char* and in a function I set it to a variable. That variable only lasts as long as the function does. The problem is it's a char* so it points to the address of the...
  19. Replies
    17
    Views
    1,497

    Wow this is greate information, helping a lot,...

    Wow this is greate information, helping a lot, I'm finding places where I can optimize using strings now, though still some are char*s. I prefer using a char* except when I gotta do a lot of...
  20. Replies
    17
    Views
    1,497

    Assigning it to a non-const char*, which most of...

    Assigning it to a non-const char*, which most of mine are.
  21. Replies
    17
    Views
    1,497

    Only problem is that c_str() returns a const

    Only problem is that c_str() returns a const
  22. Replies
    17
    Views
    1,497

    Ah, thanks guys I've been hassling over this for...

    Ah, thanks guys I've been hassling over this for hours.

    Nope, I'm using char*s. I do like the ease of string better, but nothing really uses strings, so I just keep it char*s.
  23. Replies
    17
    Views
    1,497

    Easy way to ignore chars?

    Is there an easy way to take out certain characters in a string, or do I have to do the old way and implement a for loop that removes all occurences of it?
  24. Replies
    5
    Views
    1,508

    Best way to catch input

    What would be the best way to get input for a game on windows? Besides DirectInput.
  25. Thread: Threads in C++

    by Ganoosh
    Replies
    4
    Views
    1,871

    Nice, that'll help thanks guys

    Nice, that'll help thanks guys
Results 1 to 25 of 100
Page 1 of 4 1 2 3 4