Click here to Skip to main content
15,902,635 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: adding text to multiline text box. Pin
Jose Lamas Rios8-Aug-05 19:57
Jose Lamas Rios8-Aug-05 19:57 
GeneralRe: adding text to multiline text box. Pin
Member 34198918-Aug-05 20:15
Member 34198918-Aug-05 20:15 
GeneralRe: adding text to multiline text box. Pin
Jose Lamas Rios8-Aug-05 20:30
Jose Lamas Rios8-Aug-05 20:30 
GeneralRe: adding text to multiline text box. Pin
Member 34198918-Aug-05 20:38
Member 34198918-Aug-05 20:38 
QuestionHow to make form border invisible ? Pin
Amarelia8-Aug-05 18:38
Amarelia8-Aug-05 18:38 
AnswerRe: How to make form border invisible ? Pin
Jose Lamas Rios8-Aug-05 20:07
Jose Lamas Rios8-Aug-05 20:07 
Generaltype conversion Pin
Member 20725788-Aug-05 18:30
Member 20725788-Aug-05 18:30 
GeneralRe: type conversion Pin
ThatsAlok8-Aug-05 18:34
ThatsAlok8-Aug-05 18:34 
GeneralRe: type conversion Pin
Christian Graus8-Aug-05 19:07
protectorChristian Graus8-Aug-05 19:07 
GeneralRe: type conversion Pin
Jose Lamas Rios8-Aug-05 19:46
Jose Lamas Rios8-Aug-05 19:46 
GeneralRe: type conversion Pin
Member 20725789-Aug-05 6:16
Member 20725789-Aug-05 6:16 
GeneralRe: type conversion Pin
Jose Lamas Rios9-Aug-05 6:48
Jose Lamas Rios9-Aug-05 6:48 
GeneralWeird Memory Issues Pin
LighthouseJ8-Aug-05 17:39
LighthouseJ8-Aug-05 17:39 
GeneralRe: Weird Memory Issues Pin
Christian Graus8-Aug-05 17:56
protectorChristian Graus8-Aug-05 17:56 
GeneralRe: Weird Memory Issues Pin
LighthouseJ9-Aug-05 4:19
LighthouseJ9-Aug-05 4:19 
GeneralRe: Weird Memory Issues Pin
Jose Lamas Rios8-Aug-05 18:25
Jose Lamas Rios8-Aug-05 18:25 
GeneralRe: Weird Memory Issues Pin
LighthouseJ9-Aug-05 4:27
LighthouseJ9-Aug-05 4:27 
GeneralRe: Weird Memory Issues Pin
Jose Lamas Rios9-Aug-05 4:49
Jose Lamas Rios9-Aug-05 4:49 
GeneralRe: Weird Memory Issues Pin
LighthouseJ9-Aug-05 4:54
LighthouseJ9-Aug-05 4:54 
GeneralRe: Weird Memory Issues Pin
John R. Shaw8-Aug-05 18:59
John R. Shaw8-Aug-05 18:59 
GeneralRe: Weird Memory Issues (solved this, another problem though) Pin
LighthouseJ9-Aug-05 4:55
LighthouseJ9-Aug-05 4:55 
This class is more of just an iterator embedded in a class with members in it. That function, MaximumValueReached() does work in my earlier project. About those guarantees, I did some checking and found out when it finishes the iterator, the data in it gets corrupted. I have a pre-increment and post-increment operator and here's the code that did it:

Iterator& Iterator::operator++ () {<br />
... does iteration here ...<br />
	return *this;<br />
}<br />
<br />
// post-increment<br />
Iterator Iterator::operator++ (int) {<br />
	Iterator temp = *this;<br />
	++(*this);<br />
	return temp;<br />
}


In my for loop, I was calling the post-increment operator which in turn calls the pre-increment operator. I think VC knows how to shape the machine code to increment before or after. What was happening is that the code would get to '++(*this);' and go into the pre-increment and work fine then exit back to the post-increment operator. Before the 'return temp;' statement, the iterator is fine, but after it ran the return statement, it's corrupted and I don't know how it became corrupted or deleted since it's running it's own destructor.

I did switch the for statement to the pre-increment iterator and it works until I hit the debug assertion
_ASSERTE(_CrtCheckMemory());
which I said in my first post that I was receiving before. I've read on some sites like MSDN that says it "Confirms the integrity of the memory blocks allocated in the debug heap (debug version only).". I also read that every time you malloc, it adds one to a counter and when that counter is 1 less than 1024 it asserts. I read what this assertion does but it (and web sites) offer no solution to fix it that I can find.
GeneralRe: Weird Memory Issues (solved this, another problem though) Pin
Jose Lamas Rios9-Aug-05 5:31
Jose Lamas Rios9-Aug-05 5:31 
GeneralRe: Weird Memory Issues (solved this, another problem though) Pin
LighthouseJ9-Aug-05 10:28
LighthouseJ9-Aug-05 10:28 
GeneralFound What I Needed Pin
LighthouseJ9-Aug-05 13:59
LighthouseJ9-Aug-05 13:59 
GeneralRe: Weird Memory Issues (solved this, another problem though) Pin
John R. Shaw9-Aug-05 9:20
John R. Shaw9-Aug-05 9:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.