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.05 seconds.

  1. Replies
    5
    Views
    262

    Re: Constructor with lots of parameters

    sorry, i don know why.........
    I was stuck

    How do i create the Device Object with QScopedPointer as parameter, i mean it can't be like this: The scoped pointer is not copyable.

    Device...
  2. Replies
    1
    Views
    189

    Do i need to deep copy container object?

    If i have the following




    class Test
    {
    ..

    Test(const Test&)
  3. Replies
    5
    Views
    262

    Re: Constructor with lots of parameters

    What smart pointer to pass in the ctor so that the member QScopedPointer<Data> can take over ownership? I mean do you mind to show me how to correctly release the ownership to member class _data in...
  4. Replies
    5
    Views
    262

    Constructor with lots of parameters

    Hi

    I have class that have member variables which is also a class object that contains member variables which is also a class... so on and so on... like this



    class Device
    {

    public:
  5. Replies
    21
    Views
    839

    passing smart pointer

    I just want to confirm if this is a good way;

    In the below example, there is no need to pass smart pointer to Test class, as there is no need for Test object to manage any record. There can be...
  6. Replies
    1
    Views
    206

    Help in operator > overloading in Library

    class VAR_EXPORT VAR
    {
    public:



    };
    VAR_EXPORT QDataStream &operator>>(QDataStream &p_stream, QSharedPointer<Data>& p_data)
    {
  7. Replies
    6
    Views
    378

    Re: pass by Reference to smart pointer?

    I have found a situation where i have to use QSharedPointer<Test>& without the "const" in its parameter., where in this particular case, the function pass a null parameter in... letting the callee...
  8. Re: operator > overloading for derived classes

    What do you think of the following implementation?




    class Data
    {

    // ...
  9. Replies
    6
    Views
    378

    pass by Reference to smart pointer?

    hi

    I just want to know if there is any real difference between the two below, if yes, when would i use one over the other? I would thought the "&" is pointless in below function, as far as the...
  10. Re: operator > overloading for derived classes

    I am also stuck in deserialization now... how does the functions like like??
    i guess need to check the type now??




    class Data
    {

    // ...
  11. Re: operator > overloading for derived classes

    i guess you mean



    QDataStream& operator<<(QDataStream& stream, QSharedPointer<Data> p_data)
    {
    // ...

    return stream << *p_data;
  12. Re: operator > overloading for derived classes

    i see, so it is something like below?




    class Data
    {

    ....
  13. operator > overloading for derived classes

    class Var
    {
    public:
    Var();
    ~Var();


    private:
    QMap<QString, QSharedPointer<Data>> _mapVars;
  14. 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...
  15. 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...
  16. Replies
    4
    Views
    407

    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...
  17. Replies
    2
    Views
    444

    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...
  18. Replies
    2
    Views
    444

    How to initialize QMap

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




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

    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...
  20. Replies
    3
    Views
    432

    About returning QSharedPointer or raw pointer

    Hi

    I have a class which looks like the following:



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

    by mce
    Replies
    7
    Views
    556

    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...
  22. Thread: reference to const

    by mce
    Replies
    7
    Views
    556

    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.
  23. Replies
    6
    Views
    534

    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...
  24. Replies
    6
    Views
    534

    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

    ...
  25. Replies
    6
    Views
    534

    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...
Results 1 to 25 of 773
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