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

  1. Replies
    0
    Views
    1,036

    Why this build error undeclared identifier is related to

    Hi Guru

    I am updating my post, so my codes can be better understood; This codes is meant to demonstrate the problem i am facing, although it doesn't do anything much.

    I run VC++ 2019 with...
  2. Thread: confusing macro ##

    by mce
    Replies
    1
    Views
    532

    confusing macro ##

    I am defining a macro of map with string and enum

    i keep getting error "this declaration has no storage class", what am i missing here??




    enum MY_ENUM
    {
    OFF = 0,
  3. Replies
    3
    Views
    918

    Re: using token ## in C++ function

    <CODE>
    #define DBANK(m,n)\
    bool GetDin##n()const{return (_din##m >> INPUT##nA_ST) & 1;}

    class Test
    {

    Test();
    const uint8_t VALVE2A_ST = 0;
    uint8_t _din2;
  4. Replies
    3
    Views
    918

    using token ## in C++ function

    I need to write a repetitive function name in my class such as below:




    class Test
    {

    public:
    Test();
  5. How to use boost to read and write from stream of std vector byte array?

    Hi

    I have a byte array in the form



    std::vector<unsigned char> byteArray;
  6. Thread: boost send to udp

    by mce
    Replies
    0
    Views
    981

    boost send to udp

    I am using boost ASIO like below to send udp packet to an IP and port, continuously;




    socket_.async_send_to(boost::asio::buffer(*message), remote_endpoint_,
    ...
  7. Read and write std::vector through stream

    Hi

    I have an array, std::vector<unsigned char> and i want to read and write this array, with integer or another unsigned char array. I think i need to be able to construct a binary stream from...
  8. Replies
    10
    Views
    2,800

    casting smart pointer

    Hi i have a void smart pointer as private member in my header file and inside my cpp i want to cast the smart pointer to another object,




    //in test.h

    private:
    shared_ptr<void> _data;
  9. Replies
    3
    Views
    873

    Re: Inherit a class through smart pointer

    Hi i got an error while i am building a dll library regarding the above:




    class DLL_EXPORT MyTest: public boost::shared_ptr<SomeTest>
    {
    };
  10. Replies
    3
    Views
    873

    Inherit a class through smart pointer

    hi,

    I am seeing a declaration something like this,


    class MyTest: public boost::shared_ptr<SomeTest>
    {


    };
  11. Replies
    3
    Views
    858

    Re: where is my library specified

    Hi AlexF,

    But i have tried to use the search tool Edit/Find in my Files... in visual studio in my solutions for the library name and i can't find any. how come?
  12. Replies
    3
    Views
    858

    where is my library specified

    Hi

    I am using visual studio 2012. When i compiled a third party solutions, i am facing a linkage error saying "cannot open file libxxx-0.2.4.lib" ......

    Now i checked the settings, project...
  13. Replies
    1
    Views
    601

    template with inheritable typename

    Hi

    I want to be able to define a templatised member variable with inheritable typename such as following..
    what i want is to be able to do something as the highlighted in bold.



    ...
  14. Replies
    5
    Views
    2,457

    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?
  15. Replies
    5
    Views
    2,457

    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:
  16. Replies
    1
    Views
    2,450

    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...
  17. Replies
    5
    Views
    1,940

    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...
  18. Replies
    1
    Views
    1,796

    Do i need to deep copy container object?

    If i have the following




    class Test
    {
    ..

    Test(const Test&)
  19. Replies
    5
    Views
    1,940

    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...
  20. Replies
    5
    Views
    1,940

    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:
  21. Replies
    27
    Views
    6,022

    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...
  22. Replies
    1
    Views
    1,013

    Help in operator > overloading in Library

    class VAR_EXPORT VAR
    {
    public:



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

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

    What do you think of the following implementation?




    class Data
    {

    // ...
  25. Replies
    6
    Views
    4,763

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





Click Here to Expand Forum to Full Width

Featured