|
I have never used it either.
Rather curious as to what development methodology would be in use such that this would be a feature that one could ever rely on in a non-trivial way.
|
|
|
|
|
Yeah, I'd be curious too. It's not a very helpful feature, sounds more like a feature added for the sake of adding bullet point highlights for a new release of VS.
|
|
|
|
|
I very rarely use it to fix minor typo-like errors, such as replacing < with <= , or changing literal values in assignments or function calls to something else. The reason is that I'm often confronted with deep levels of function calls with multiple nested loops, and getting back to the same point of debugging can be very time consuming.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
True, but nothing that you couldn't do with a bookmark and/or a conditional break point.
|
|
|
|
|
Hi,
No it is not implemented for 64 bit. Furthermore x64 edit and continue for unmanaged is not implemented on VS versions all the way up to VS2013++.
Best Wishes,
-David Delaune
|
|
|
|
|
I have a class (taken from somewhere). Here, I have a member like this:
public:
void SetBitmapDataSize(const int x, const int y);
private:
int m_PixelNumberX;
int m_PixelNumberY;
vector<vector<COLORREF> > BitmapData;
and SetBitmapDataSize is implemented:
void CBitmapOp::SetBitmapDataSize(const int x, const int y)
{
m_PixelNumberX = x;
m_PixelNumberY = y;
if((x>=0) && (y>=0))
{
BitmapData.resize(m_PixelNumberX);
for(int x = 0; x < m_PixelNumberX; x++)
BitmapData[x].resize(m_PixelNumberY);
}
}
Now, I want to replace vector<vector<colorref> > with this CArray:
I had tried:
private:
int m_PixelNumberX;
int m_PixelNumberY;
CArray< CArray<COLORREF, COLORREF&>, CArray<COLORREF, COLORREF&> > m_arrBitmapData;
my question is, how can replace vector.resize method, and how can I return CArray< CArray<COLORREF, COLORREF&>, CArray<COLORREF, COLORREF&> > data type ?
Thank you.
modified 4-Sep-14 8:17am.
|
|
|
|
|
Flaviu2 wrote: my question is, how can replace vector.resize method... Have you tried this.
Flaviu2 wrote: ...and how can I return CArray< CArray<COLORREF, COLORREF&>, CArray<COLORREF, COLORREF&> > data type ? From where?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Ok, resize issue has been solved.
Secondly, as long m_arrBitmapData is private memeber, I want to return this memeber through a public method, I mean from this class ...
Something like that:
public:
CArray< CArray<COLORREF, COLORREF&>, CArray<COLORREF, COLORREF&> > GetBitmapArray(){return m_arrBitmapData;}
because this trial give me:
error C2558: class 'CArray<class CArray<unsigned long,unsigned long &>,class CArray<unsigned long,unsigned long &> >' : no copy constructor available
|
|
|
|
|
Just return a constant reference as in
const CArray< CArray<COLORREF, COLORREF&>, CArray<COLORREF, COLORREF&> > & GetBitmapArray()
The good thing about pessimism is, that you are always either right or pleasently surprised.
|
|
|
|
|
I think is working ... I have one more question: there is a way to pass a paramanter as CArray< CArray<COLORREF, COLORREF&>, CArray<COLORREF, COLORREF&> >, just like:
void SetPlotData(CArray< CArray<COLORREF, COLORREF&>, CArray<COLORREF, COLORREF&> > InputArray);
and
void CGraphCtrl::SetPlotData(CArray< CArray<COLORREF, COLORREF&>, CArray<COLORREF, COLORREF&> > InputArray)
{
if ((m_PixelNumberX>0) && (m_PixelNumberY > 0))
{
PlotData = InputArray;
}
}
because code above doesn't work:
error C2582: 'CArray<class CArray<unsigned long,unsigned long &>,class CArray<unsigned long,unsigned long &> >' : 'operator =' function is unavailable
As soon as I solve this error, my program will run ...
modified 5-Sep-14 4:55am.
|
|
|
|
|
Quote: Now, I want to replace vector > with this CArray: That's not advisable. I wouldn't do it. As matter of fact the vector container is much better than the CArray one.
Quote: how can replace vector.resize method, Use the Carray::SetSize[^] method.
Quote: how can I return CArray< CArray<colorref, colorref&="">, CArray<colorref, colorref&=""> > data type The same way you return other data, e.g.
return m_arrBitmapData;
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?!
-- C++ FQA Lite
|
|
|
|
|
I would neither store nor return the bitmap data in that way. What you are creating here is a so-called "ragged" array, in which each row can have a different length. In a bitmap this luxury is not needed, all rows are of equal length by definition. Therefore a one-dimensional array is good enough and in some regards even superior.
a) A one-dimensional array can be allocated in one chunk (whereas your ragged array needs N allocations, N being the number of rows)
b) A one-dimensional array does not incur the overhead that comes with a ragged array, which is easily 3 x 64bits per row.
To access the members of the one-dimensional array in a 2D fashion, simply use the algorithm:
index of pixel (x, y) = x + y*pixelsPerRow
As a return value for your access function I would suggest you use a simple pointer (const COLORREF*).
For the caller to know how to access that 1D array you should provide addition access functions for the number or rows and number of columns.
|
|
|
|
|
Ohh, I would love to get rif of 2D array ... I had taken the class from here[^], could you assit me how to give up vector<vector<colorref>> BitmapData ? If I am not asking too much ... I will start working, to see what is happen ... See you.
|
|
|
|
|
It is not very difficult to get rid of this 2D array.
1) replace it with a vector<colorref> m_bitmapData;
2) Replace any reference to the old BitmapData array as follows:
BitmapData[x][y] should be replaced by m_bitmapData[x + m_PixelNumberX*y]
3) In SetBitmapDataSize allocate the new array by
m_bitmapData.resize (x * y);
Change the function interfaces accordingly. Should be really easy.
|
|
|
|
|
Kindly thank you NV3 ! I will let you know what I have done.
|
|
|
|
|
Great ! Is working, just like the original one ... I didn't replace 2D array by vector, but with CArray ... and is working ! Kindly thank you, NV3 !
|
|
|
|
|
|
Let two exes use same dll in windows platform at particular time.Then what is shared internally?Please correct me if I am wrong.
-Dll file in Hard disk is shared(Single copy).
-Instructions in Dll are loaded once and code can be used by both the executable.
-The objects in the Dlls are also shared by both executable.
Please clear me - The mechanism in windows os. whether this is same across all OS.
Thank you in Advance.
|
|
|
|
|
From MSDN[^]:
DLLs also help reduce memory overhead when several applications use the same functionality at the same time, because although each application receives its own copy of the DLL data, the applications share the DLL code.
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?!
-- C++ FQA Lite
|
|
|
|
|
@CPAllinii
Thank you for answer. But if two dlls(having same signature) in two different directories and linked by tw different executable. Then what will happened? Is the design same across different OS.
Please answer.
|
|
|
|
|
|
There's an order by which exe's look for libraries. It will use the first one it finds, I believe CPallini gave you a link that specifies the search order. You can use tools such as Dependency Walker[^] to see what dll specifically is getting loaded by an exe if you're not sure which one it's loading. It is customary that shared dll's are placed in a location where any program that wants to use it has access to it, of course, this will require admin privilidges for your installer (assuming you place the dll copy in a system folder).
|
|
|
|
|
As far as object data (memory), that's not shared at all.... it's just the code that is shared. For example, if you have two exe's using an IO dll, the state of one will not affect the other, they're still independent while running. If you want them to share something, you have to set that up using other means (IPC).
|
|
|
|
|
HI,
I have Visual studio 2005 on WIn7 system. Project dependencies and Buildorder everything is in place and correct.
But it is not Building according to build order correctly when doing clean and Rebuild.
I checked with other win7 sytem it is doing properly there.
Any thoughts.
|
|
|
|
|
It could be because parallel compilation is used on a multi core machine. If two projects are not strictly dependent, they can be built in parallel.
If you wanted to enforce the build order (including single thread compilation), you could set the dependencies in a single row even though theprojects don't really depend on each other. But why would you want to do this?
The good thing about pessimism is, that you are always either right or pleasently surprised.
|
|
|
|