dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: babaliaris

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Re: [vsCode and gdb]: Breakpoints don't work with macros?

    I'm already using others, like google test. Just for fun and knowledge I'm creating my own. Google test also uses global variables to achieve that.
  2. Re: Templates: Generic Linked List, I stuck at returning type in template functions.

    I fixed the remove method. (Yes I wasn't handling the disconnection of the deleted node from the list).

    Well about the for loop, it works if the size does not change. if you do something like...
  3. Re: [vsCode and gdb]: Breakpoints don't work with macros?

    I understand now. Well, I'm trying to figure another implementation which googletest follows and I think it will work.



    #include <iostream>
    #include <ctime>
    #include <vector>


    #define...
  4. [vsCode and gdb]: Breakpoints don't work with macros?

    Hello!

    I made a unit testing framework and for the first time, I noticed that breakpoints won't work with macros. This is how my tests look like:


    main.cpp


    #include <VampTest/VampTest.h>...
  5. Re: Templates: Generic Linked List, I stuck at returning type in template functions.

    This is my current implementation and it works quite well.



    #ifndef VMPS_LINKEDLIST_HPP
    #define VMPS_LINKEDLIST_HPP
    #include <iostream>

    namespace VMPS
    {
  6. Re: Templates: Generic Linked List, I stuck at returning type in template functions.

    I think I get the idea now. Tell me if I understood it correctly :D

    Something like this (code did not tested):
    User's Code:



    //The other must be the same type as the search method template....
  7. Re: Templates: Generic Linked List, I stuck at returning type in template functions.

    source of the above quote

    Ok, I searched c++ iterators on the internet and found this. I'm new to STL and I didn't know that. Thank you for pointing me in the right direction. I'm off my way...
  8. Re: Templates: Generic Linked List, I stuck at returning type in template functions.

    I just tried and my eyes popped out :d
  9. Templates: Generic Linked List, I stuck at returning type in template functions.

    Hello.

    Until now, I used to do things the old way (As I learned in the java course). For example, in order to create a generic linked list, I would create a Node class which the user can inherit...
  10. Re: Wanings logging system when trying to access freed memory?

    Actually, can I inherit smart pointers to extend them?
  11. Re: Wanings logging system when trying to access freed memory?

    This is basically a unique_ptr implementation, right? I see now! Incredible! Finally, I learned why smart pointers can be handy.

    If I'm not wrong, shared ptrs are implemented with reference...
  12. Re: Wanings logging system when trying to access freed memory?

    I just noticed that this will cause a problem... What if those references go out of scope??? Then, when the deletion of the object happens, I will try to set NULL references that have gone out of...
  13. Re: Wanings logging system when trying to access freed memory?

    Is this what you mean?



    #include <iostream>
    #include <vector>

    using namespace std;
  14. Re: Wanings logging system when trying to access freed memory?

    Can you show me with an example? Because I'm struggling understanding what you mean. Thank you.
  15. Wanings logging system when trying to access freed memory?

    I was wondering if I could create a logging system to use for identifying if my code is trying to delete or access freed memory.
    This is how it could work.



    LOGGER(my_object, "Warning: this...
  16. Re: Will this header only strategy, avoid circular inclusion?

    @wolle thanks!
  17. Re: Will this header only strategy, avoid circular inclusion?

    These was some really good advices! I never thought of them. I will keep in mind creating a 3d middle class that might help solving circular inclusion.

    The situation where you define them inside...
  18. Re: Will this header only strategy, avoid circular inclusion?

    No. But I've done something similar and much more complicated and works pretty good.



    Well, probably you don't know about header-only libraries. This has some really good advantages when It...
  19. [RESOLVED] Will this header only strategy, avoid circular inclusion?

    I know the basic rules about header-only libraries (such as functions must be declared inline, etc..) but when I tried creating a complicated engine, I was encountering circular inclusion problems....
  20. Re: Shared Lib: Can const char * travel between client and shared libs?

    Yeap, I get it know!!! Well my mind probably was thinking that c_str() returns a copy of the actuall string, but this is not the case.
    Thanks :D
  21. Re: Shared Lib: Can const char * travel between client and shared libs?

    Well after some thoughts I think I know the answer now. Is it because the inline std::string WindowImpl::getTitle() returns a copy of the std::string object right? So inside here:

    extern "C" const...
  22. Re: Shared Lib: Can const char * travel between client and shared libs?

    LOL I think I know what is going on. The problem lies definitely in these two:

    windowImpl.h:


    #ifndef VAMPENGINE_WINDOWIMPL_H
    #define VAMPENGINE_WINDOWIMPL_H

    #include <iostream>
  23. Re: Shared Lib: Can const char * travel between client and shared libs?

    Yes. The std::string is a member of windowImpl (inside dll) class which lives as long as the entire application.

    I will try using everywhere const char * instead of std::string, to see if this...
  24. Re: Shared Lib: Can const char * travel between client and shared libs?

    Yes, I know, but I can't return an std::string using an extern function (I'm carrying about the value not the actuall object). So what are you trying to tell me? Is that the problem? And why?
  25. Re: Shared Lib: Can const char * travel between client and shared libs?

    Using the initialization list of a constructor. I will try to reproduce a minimal test.

    Anything that starts with vampEngine... is an extern "C" function. In most of the files down below I will...
Results 1 to 25 of 115
Page 1 of 5 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)