Search:
Type: Posts; User: Yadrif
Search:
Search took 0.01 seconds.
-
December 5th, 2014, 10:34 AM
Thanks for the help. I am starting resolve my misunderstanding.
I don't understand why the following code has the & after the type to cast to:
reinterpret_cast<double&>(piAsLong);
I read...
-
December 5th, 2014, 09:21 AM
Hi Everyone.
I'm trying to understand why a conversion from a byte array (unsigned char) to a double works when done one way and not antoher.
In the example code I test by hard coding an...
-
October 22nd, 2014, 01:56 PM
I think you need to #include Parser.h in Parser.cpp
-
November 30th, 2012, 09:30 AM
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...
-
November 29th, 2012, 09:45 AM
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...
-
October 15th, 2012, 03:56 PM
-
October 15th, 2012, 03:22 PM
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?
-
April 18th, 2012, 08:30 AM
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++...
-
March 6th, 2012, 08:13 AM
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...
-
February 17th, 2012, 04:35 PM
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.
-
February 17th, 2012, 04:20 PM
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...
-
February 17th, 2012, 03:31 PM
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...
-
February 17th, 2012, 03:03 PM
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++...
-
January 27th, 2012, 08:33 AM
Usually setter functions take a const reference and return void.
For example:
void person::set_person(const string& n)
{
...
}
-
January 29th, 2011, 08:24 AM
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:...
-
March 16th, 2010, 02:36 PM
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"...
-
December 8th, 2009, 03:34 PM
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...
-
September 15th, 2009, 12:50 PM
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...
-
September 15th, 2009, 12:01 PM
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...
-
September 15th, 2009, 10:38 AM
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...
-
July 16th, 2009, 10:45 AM
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,...
-
April 2nd, 2009, 10:31 AM
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...
-
February 4th, 2009, 08:52 AM
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.
-
February 4th, 2009, 08:31 AM
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...
-
November 12th, 2008, 10:57 AM
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...
|
Click Here to Expand Forum to Full Width
|