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

Search:

Type: Posts; User: mce

Page 1 of 31 1 2 3 4

Search: Search took 0.03 seconds.

  1. Re: A meaningful way of accessing a table by container

    Thanks VictorN, i haven't thought of that.
    But the number of defined Err and Rate magnitude could be from 0 to N, where N is determined in run time... is there an expandable enum or something...
  2. A meaningful way of accessing a table by container

    Hi

    I need a "meaningful" way of accessing a table, the column is representing Err magnitude, and the row is representing Rate magnitude. For each error magnitude and rate magnitude, i define an...
  3. Replies
    4
    Views
    376

    how to export class with template

    I have the following class header in library, but when i initialize in main the class, i have an error unresolved external symbols. So the class is not exported as it should.




    template...
  4. Replies
    2
    Views
    362

    Re: How to initialize QMap

    I am using Qt 5.2.1 with visual studio 2012

    I can't seem to be able to do that
    The compiler error :

    1 IntelliSense: initialization with '{...}' is not allowed for object of type...
  5. Replies
    2
    Views
    362

    How to initialize QMap

    how to initialize a QMap<QString,int> like following?




    map<string, int> m = {{"aa", 1}, {"bb",2}};
  6. Replies
    3
    Views
    370

    Re: About returning QSharedPointer or raw pointer

    I believe nothing to worry too if i were to use QSharedPointer<Data> as it is also a copy of the pointer being returned from function GetData() after i do

    _data.data();

    what the user deleted...
  7. Replies
    3
    Views
    370

    About returning QSharedPointer or raw pointer

    Hi

    I have a class which looks like the following:



    class Gadgets
    {
    public:
  8. Thread: reference to const

    by mce
    Replies
    7
    Views
    512

    Re: reference to const

    Well as i mentioned, i want a "readonly" reference to all the Data inside a list.

    The List of data is passed to the device during device initialization. Inside device, i may check every now and...
  9. Thread: reference to const

    by mce
    Replies
    7
    Views
    512

    reference to const

    Hi,

    i want to store reference to a const object in my class as a member variable, as follow:

    I basically want a readonly reference to |Data| in Device object.
  10. Replies
    6
    Views
    503

    Re: Cloning object passed by function

    well i haven't figured out how to do it.. but i am just curious if this is an alternative way worth to look into, if i still use


    QMap<QString, QSharedPtr<Test>> _pTest;

    void AddTest(const...
  11. Replies
    6
    Views
    503

    Re: Cloning object passed by function

    Hi laserlight,

    Thanks for that!! Precise answers.

    Now, in addition to pass by const pointer to const testobj, how do i add another AddTest method with the following signatures

    ...
  12. Replies
    6
    Views
    503

    Cloning object passed by function

    Is it correct for me to make a clone of testobj in function AddTest below, before i add it to my map? What i want is an user pass testobj to me though AddTest, and after i add it into my map, i do...
  13. Replies
    8
    Views
    758

    Re: problems in smart pointers

    Thanks!!!

    More questions;





    I thought i am just returning my private class member variable object? I didn't create any local object.
  14. Replies
    8
    Views
    758

    problems in smart pointers

    Hi If i have a smart pointer to a private member variable such as



    QScopedPtr<Test> _pTest;




    and I want to return a copy of this object to caller.
  15. Replies
    3
    Views
    352

    Re: passing object by pointer to function

    is a typo, should be



    void AddData(QString str, Data* data)
    {
    _myDataMap.insert(str,data);
    }

    //and
  16. Replies
    3
    Views
    352

    passing object by pointer to function

    Hi

    I have a Qt classes as follow:



    class Vehicle
    {

    public:
  17. Replies
    2
    Views
    260

    assign auto_ptr to unique_ptr

    I have a function who return an auto_ptr to me and i wish to assign this pointer to a unique_ptr in my class member variable.




    class Data
    {
    ....
    void Run();
    private:
  18. Thread: template function

    by mce
    Replies
    3
    Views
    278

    Re: template function

    hi

    I declared a template function in my .h file, but it doesn't seem to be able to take virtual.



    template <typename K, typename V> virtual V GetWithDef(const std::map <K,V> & m, const K &...
  19. Thread: auto_ptr

    by mce
    Replies
    1
    Views
    234

    auto_ptr

    Hi,

    I have a few questions regarding this auto_ptr

    1) I should only use auto_ptr within a function??

    2) Can i use auto_ptr<int> or auto_ptr<SomeClass> in a class?
    example:
  20. Thread: template function

    by mce
    Replies
    3
    Views
    278

    template function

    hi,

    I just want to be sure..

    I have made a template function as follow;



    template<typename V>
    ProcessValue(const & V)
  21. Replies
    2
    Views
    297

    Re: copy part of vector 1 to vector 2

    TQ so much, don know why my mind just got stuck when i was shown the example of copy using begin() and end()..... sighhhhhhhhh
  22. Replies
    2
    Views
    297

    copy part of vector 1 to vector 2

    Hi,

    I am trying to copy vector to vector as follow:



    std::vector<unsigned char> vec1;

    //insert some values into vec1
  23. Re: How to insert and retrive an object without default ctor from container?

    i tried the following:



    mymap["test"]=mycppobj;

    std::map<std::string,CPP_OBJECT>::iterator it=mymap.find("test");
    std::pair<std::string,CPP_OBJECT> pair=*it;
    CPP_OBJECT* t=pair.second();...
  24. How to insert and retrive an object without default ctor from container?

    Hi,

    I have a third party class object, CPP_OBJECT that i save in std container.
    for example; i want to do the following.

    std::map<std::string, CPP_OBJECT> mymap;
    mymap["test"]= myobj;
    ...
  25. Replies
    8
    Views
    603

    Re: Multithread writing data

    Hi rliq,

    Thanks for that.
    I am too using the asynchronous threads to do the updates and enumerating.
    But on the data update part and enumerating part,

    a closer simulation is to update the...
Results 1 to 25 of 760
Page 1 of 31 1 2 3 4


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center