I meant: I have some public variables in CMyView class.These variables must be updated from INSIDE the CMyMainFrame class. How can I get access from CMyMainFrame to public variables in CMyView class?
In fact,how can I update public variables I have in CMyView class from CMyMainFrame class?
I did it,Because it seemed very easy, but then I get CDocument ERROR!
After adding #include "CMyView.h" into CMyMainFrame, I get CDocument ERROR!
I searched a lot on the internet, all say use GetActiveView() but it does not work!
You're index is going out of bounds on the st variable 'st[i]', when i is equal to l.
Also, having nested for loops with the same index variable name is tough to read.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
there are still charactes in the input buffer, hence, the next call to getline gets them.
A commont way to deal with this issue is using cin.ignore (see, for instance What is the use of cin.ignore() in C++?[^]).
"In testa che avete, Signor di Ceprano?"
I am trying to draw an image (2nd image) over the other image (existing image file - 1st image) using gdi+ bitmap and graphics and then saving (overwriting) the same 1st image file. But saving is not getting done, when i use GetLasError(), it shows error message,
"The process cannot access the file because it is being used by another process"
Here is the code what i am doing.
<pre>Gdiplus::Bitmap *gpBitmap = new Gdiplus::Bitmap(mImagePath1); /// existing image file
Gdiplus::Graphics *gr = Gdiplus::Graphics::FromImage(gpBitmap);
Gdiplus::Bitmap img(mImagePath2); // second image
Gdiplus::Bitmap* pThumbnail = static_cast<Gdiplus::Bitmap*>(img.GetThumbnailImage(32, 32, NULL, NULL));
gr->DrawImage(pThumbnail, newWpos, newHpos); // drawing the second image on some position of first image
Gdiplus::Status stat = gpBitmap->Save(mImagePath1, pClsid); // pClsid - image encoder set for png output
It seems that the extraction operator >> simply does not work anymore. In that case, what is the best alternative for reading data from a text file. If I replace strstream with stringstream I get the message that stringstream does not have a >> operator.