Type: Posts; User: ekhule
Search took 0.01 seconds.
Nevermind I figured this out, and it is not worth answering on here.
April 18th, 2013 08:39 AM
I have a class called Wheel, and I created a boost shared_ptr to this class in the following way:
typedef boost::shared_ptr<Wheel> WheelPtr;
I also have a vector of these...
February 11th, 2013 08:51 AM
I am tryign to use the Singleton design patterno on Linux, but it is not working:
in the .h I have:
static ErrorH& Instance();
January 18th, 2013 06:15 AM
How would you fix this code? I am stumped!
January 17th, 2013 09:40 AM
Hello, I have the following code where I use the singleton design pattern, but I get the warning:
warning C4715: 'CM::Instance' : not all control paths return a value
January 14th, 2013 12:31 PM
I have the following code:
When I run this from the IDE in Release mode, it works fine, no crashes. However, when I change "12345678" to...
Do you have any sample code with that function? I can't much about it online.
I have a file path in a wstring like this:
wstring pathName = L"c:\windows\system\test.exe";
I want to be able to geta new wstring that just contains "test" from this wstring.
Figured it out, nevermind!
Figured it out, nevermind!\
March 22nd, 2012 08:57 AM
nevermind.. I missed a sneaky /MD :)
March 22nd, 2012 08:49 AM
I get the following linking errors when trying to compile my exe:
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _tolower already defined in libcmt.lib(tolower.obj)...
March 21st, 2012 09:08 AM
figured it out.. typo in my code:
::SetDIBits(dc.m_hDC, bitmap, 0, dyextent, &bits_, &bmi_,0);
::SetDIBits(dc.m_hDC, bitmap, 0, dyextent, &bits1d, &bmi_,0);
March 21st, 2012 06:29 AM
hmm ok, so my code looks like this now:
in .h file:
vector<vector<int> > bits_;
for(unsigned int i=0; i<bits_.size(); ++i)
March 20th, 2012 01:33 PM
I get this compilation error:
error C2440: 'initializing' : cannot convert from 'std::vector<_Ty>' to 'const std::vector<_Ty> &'
on this line:
const vector<int> & v = bits[i];
March 20th, 2012 01:18 PM
Thanks for the replies gentlemen :)
March 20th, 2012 06:44 AM
I have a 2d vector like this:
vector<vector<DWORD> > bits = vector<vector<DWORD> >(100, vector<DWORD>(100));
I would like to, in code, convert this vector to 1d like this:
March 20th, 2012 06:38 AM
Would it be sufficient to write code to convert the two vectors to one single vector to be passed in? Anyone have any example code to do that?
March 19th, 2012 03:06 PM
I have some code using the SetDIBits function:
and I was wondering if I could pass an stl::vector of vectors to the...
March 19th, 2012 10:11 AM
March 19th, 2012 09:10 AM
In code, I need to transform these values:
256 becomes 0
128 becomes 1
64 becomes 2
32 becomes 3
16 becomes 4
8 becomes 5
March 16th, 2012 02:59 PM
Thanks everyone! Except S M A :P
March 16th, 2012 12:16 PM
I need to use dynamic memory because I am sending the vector to another thread.
How does the allocation work? I tried this code below and it crashes on the reserve() call.
March 16th, 2012 12:15 PM
Thanks so much, I appreciate your time today in helping me! :)
March 16th, 2012 10:45 AM
I have a pointer to a vector that contains instances of class Test:
If I do this:
Click Here to Expand Forum to Full Width