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

Search:

Type: Posts; User: Yadrif

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Re: Compile Error with Static Template Function (VS vs. g++)

    I did not know about the warning level. I made the change.

    Also, I read about lvalue and rvalue and now understand more what is going on. I would like to mark the argument as const but in the real...
  2. [RESOLVED] Compile Error with Static Template Function (VS vs. g++)

    The below code compiles without error using VS 2012 but with g++ 4.1.2 I get this error:



    main.cpp: In function 'int main(int, char**)':
    main.cpp:37: error: no matching function for call to...
  3. Replies
    3
    Views
    467

    Re: Strangley placed else

    Thanks very much.
  4. Replies
    3
    Views
    467

    [RESOLVED] Strangley placed else

    In this code snippet what does the line (line 20) that reads



    else ;


    cause to the flow of the program, if anything? If it does nothing why would someone have it there?
  5. Replies
    8
    Views
    1,598

    Sharing struct between C and C++

    I am attempting to use C code from C++ and am having trouble sharing a struct between the two languages.

    Currently I am able to get everything to compile by defining the struct in both the C++...
  6. Replies
    12
    Views
    820

    Re: Some cyclic references problem

    In NodePool.h you could use only the forward declaration for CObjects and put the implementation of the function



    float getCost(CObjects* unit)


    in a .cpp file with the #include for...
  7. Re: [RESOLVED] Move elements from one container to another without loop

    Thanks for everyone's help. I was so focused on finding an algorithm to do this in one call I didn't think to copy then erase.

    Once again thank you guys for your help.
  8. Re: Move elements from one container to another without loop

    Is your example only removing the elements from dataQ that are copied to data_array?

    I see



    dataQ.clear()


    But that will drop all elements not just what was copied with std::copy. Or...
  9. Re: Move elements from one container to another without loop

    I'm not taking all of the data from the dataQ only what is requested by the caller of the function. The size variable is the amount of data requested by the caller. Int he real code data_array is a...
  10. [RESOLVED] Move elements from one container to another without loop

    Is there an algorithm in the STL to move elements similar to how std::copy works? I have read various places that the new C++ standard has a move algorithm. Unfortunately the compiler I use (g++...
  11. Replies
    24
    Views
    3,203

    Re: problem with push_back

    Usually setter functions take a const reference and return void.

    For example:


    void person::set_person(const string& n)
    {
    ...
    }
  12. What does synthesized method first required here mean?

    Hi Everyone.

    I'm getting a few messages like this from the gcc (version 4.1.2) compiler.

    [cc] /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_construct.h:81:...
  13. Passing By Reference then Deleting the Passed Object

    Why does the following code not break after delete bar? It seems like the object foo would have a reference to a deleted object and crash in printBar(). Is bar not really gone after the "delete bar"...
  14. Multiple threads on single CPU vs. multiple CPU

    In general what are the additional or special things to be concerned about and watch out for when making a multi threaded app run correctly on a multiple CPU machine?

    I remember from a while back...
  15. Re: [RESOLVED] How to use a derived function for std::priority_queue Compare

    I figured it out.

    I ended up adding a template parameter to ProcessingQueue and using that as the thrid template parameter to std::priority_queue.
    I created a default Comparer with the signature...
  16. Re: How to use a derived function for std::priority_queue Compare

    I was expecting the user to supply the comparison function at compile time. My theory was that they would derive a class from Comparer and override operator().

    Either was is probably okay as the...
  17. [RESOLVED] How to use a derived function for std::priority_queue Compare

    I have a template class that contains a std::priority_queue and would like for the user of this class to be able to pass in the functor object that is used for comparison. Here is the code I have but...
  18. Replies
    1
    Views
    1,907

    [RESOLVED] Enum in template class

    Can anyone help with the cause and resolution to this compile error?

    Here is the code:


    template <typename T>
    class BigQueue {
    public:
    enum QueueState {GOOD, BAD,...
  19. Replies
    1
    Views
    1,826

    PTHREAD_MUTEX_INITIALIZER being typeless

    I found a comment in code stating that PTHREAD_MUTEX_INITIALIZER is typeless then the following code:



    const pthread_mutex_t pthread_mutex_initer = PTHREAD_MUTEX_INITIALIZER;


    then...
  20. Replies
    4
    Views
    359

    Re: Linker Error Help

    Do you mean the linker is trying to find libXyz.so or the .so that the some_symbol is defined in?

    Thanks for your help.
  21. Replies
    4
    Views
    359

    Linker Error Help

    Hi Everyone,
    In general what is the following linker error indicating?

    /app/lib/libXyz.so: undefined reference to `some_symbol'

    Using g++ compiler on Linux.

    I get multiple of these all...
  22. Replies
    1
    Views
    1,159

    Generate CRUD Operations

    Hi Everyone,
    I have a physical data model in Rose Data Modeler and ERwin. I would like to generate CRUD operations in Java but do not see an option for this in either Rose or ERwin.

    Is there...
  23. Replies
    3
    Views
    711

    Iterator Question

    Hello Everyone,
    I would like to return a pointer to an object that is found in a set. Here is the code:



    #include <cstdlib>
    #include <iostream>
    #include <string>
    #include <set>
  24. Re: non-virtual functions declared in class with virtual functions

    The issue here is that the base class has no implmentation for the overloaded operator functions, only a declaration, so I don't see how they could be called by the derived object.

    So I'm...
  25. Re: non-virtual functions declared in class with virtual functions

    Graham,
    The sample code I posted had no implementation for the non-virtual functions which is why I was questioning the purpose of them.

    I'm still not exactly sure. I'll re-read laserlight's...
Results 1 to 25 of 33
Page 1 of 2 1 2


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