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 32 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    5
    Views
    254

    Re: Error : more than one operator matches

    yeah, it doesn't compile as well, it gives error "more than one conversion function from std::atomic<Foo*> to bool applies ...."

    I think the goal here is how to check for null ptr?
  2. Replies
    5
    Views
    254

    Error : more than one operator matches

    While trying to compile some codes from
    http://ideone.com/olvK13
    i encounter some compiler error mentioned which i am not able to solve.




    class Foo
    {
    public:
  3. Replies
    1
    Views
    734

    QtSerialPort in Windows

    Has anyone use QtSerialPort on Windows 7 before successfully?
    I can read my serial com data with serial port diagnostic tools; but i can't get it through my codes.
    my code snippets below:
    The data...
  4. Replies
    5
    Views
    600

    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...
  5. Replies
    1
    Views
    378

    Do i need to deep copy container object?

    If i have the following




    class Test
    {
    ..

    Test(const Test&)
  6. Replies
    5
    Views
    600

    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...
  7. Replies
    5
    Views
    600

    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:
  8. Replies
    27
    Views
    2,338

    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...
  9. Replies
    1
    Views
    343

    Help in operator > overloading in Library

    class VAR_EXPORT VAR
    {
    public:



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

    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...
  11. Re: operator > overloading for derived classes

    What do you think of the following implementation?




    class Data
    {

    // ...
  12. Replies
    6
    Views
    808

    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...
  13. 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
    {

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

    i guess you mean



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

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

    i see, so it is something like below?




    class Data
    {

    ....
  16. operator > overloading for derived classes

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


    private:
    QMap<QString, QSharedPointer<Data>> _mapVars;
  17. 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...
  18. 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...
  19. Replies
    4
    Views
    562

    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...
  20. Replies
    2
    Views
    1,010

    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...
  21. Replies
    2
    Views
    1,010

    How to initialize QMap

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




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

    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...
  23. Replies
    3
    Views
    736

    About returning QSharedPointer or raw pointer

    Hi

    I have a class which looks like the following:



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

    by mce
    Replies
    7
    Views
    783

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

    by mce
    Replies
    7
    Views
    783

    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.
Results 1 to 25 of 776
Page 1 of 32 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center