Click here to Skip to main content
15,899,474 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: problem walking all over an array Pin
Zac Howland22-Jun-06 9:27
Zac Howland22-Jun-06 9:27 
GeneralRe: problem walking all over an array Pin
pblais22-Jun-06 10:21
pblais22-Jun-06 10:21 
GeneralRe: problem walking all over an array Pin
David Crow23-Jun-06 3:49
David Crow23-Jun-06 3:49 
GeneralRe: problem walking all over an array Pin
pblais23-Jun-06 10:53
pblais23-Jun-06 10:53 
GeneralRe: problem walking all over an array Pin
Zac Howland25-Jun-06 8:45
Zac Howland25-Jun-06 8:45 
GeneralRe: problem walking all over an array Pin
pblais26-Jun-06 9:06
pblais26-Jun-06 9:06 
GeneralRe: problem walking all over an array Pin
Zac Howland26-Jun-06 9:28
Zac Howland26-Jun-06 9:28 
GeneralRe: problem walking all over an array Pin
pblais26-Jun-06 10:13
pblais26-Jun-06 10:13 
Zac Howland wrote:
For your second issue, if the next area in memory is getting trashed when you change the size of the array, look for something that is assuming a memory location (since this is a hardware simulation, I wouldn't be surprised to see a few). Also look for code similar the the segment above that writes to something out of bounds when dealing with the ROM_Buffer of a different size.


Hi again Zac... I've been playing around since I posted.... By the way thanks for the help on the first part...

Anyways... The array below ROM_Buffer (RxBuffer) is affected but not really any code is run

In the main dialog:
MYDLL = new APM_Driver;<br />
bTestVal = DUT->RxBuffer[1];    <------BREAK ONE HERE<br />


Then in the APM_Driver.cpp file:
//////////////////////////////////////////////////////////////////////<br />
// Construction/Destruction<br />
//////////////////////////////////////////////////////////////////////<br />
<br />
APM_Driver::APM_Driver()<br />
{<br />
	baud_rate = 19200;<br />
	SelectComms();<br />
}<br />
<br />
APM_Driver::~APM_Driver()<br />
{<br />
	delete	comms1;<br />
}<br />
<br />
void APM_Driver::SelectComms()<br />
{<br />
	int	i_c;<br />
<br />
//	comms1 = new CCommsDriver1;<br />
<br />
	for(i_c = 0; i_c <=255; i_c++)<br />
		RxBuffer[i_c] = unsigned char (i_c);<br />
<br />
	for(i_c = 0; i_c <=255; i_c++)<br />
		TxBuffer[i_c] = unsigned char (i_c);<br />
        i_c = 1;                         <------BREAK TWO HERE<br />
}<br />


As you can see comms1 = new CCommsDriver1; has been commented out. SO the only code that is executed are the two small loops that initialize RxBuffer and TxBuffer to 0->255. Yet when I break the code at BREAK TWO, both buffers are ok but when I stop at BREAK ONE, MYDLL->RxBuffer is trashed.

Thanks
Pierre
GeneralRe: problem walking all over an array Pin
Zac Howland26-Jun-06 10:25
Zac Howland26-Jun-06 10:25 
Questionabout printing formulars Pin
ivanris22-Jun-06 8:08
ivanris22-Jun-06 8:08 
Questionmultiple selections in List View (LVS) Pin
aafcls22-Jun-06 8:04
aafcls22-Jun-06 8:04 
AnswerRe: multiple selections in List View (LVS) Pin
Michael Dunn22-Jun-06 8:28
sitebuilderMichael Dunn22-Jun-06 8:28 
GeneralRe: multiple selections in List View (LVS) Pin
aafcls22-Jun-06 8:48
aafcls22-Jun-06 8:48 
GeneralRe: multiple selections in List View (LVS) Pin
Zac Howland22-Jun-06 9:40
Zac Howland22-Jun-06 9:40 
GeneralRe: multiple selections in List View (LVS) Pin
Michael Dunn22-Jun-06 10:45
sitebuilderMichael Dunn22-Jun-06 10:45 
GeneralRe: multiple selections in List View (LVS) Pin
aafcls23-Jun-06 4:02
aafcls23-Jun-06 4:02 
GeneralRe: multiple selections in List View (LVS) Pin
Michael Dunn23-Jun-06 15:01
sitebuilderMichael Dunn23-Jun-06 15:01 
QuestionTypedef Pin
Jay0322-Jun-06 7:59
Jay0322-Jun-06 7:59 
AnswerRe: Typedef Pin
Michael Dunn22-Jun-06 8:29
sitebuilderMichael Dunn22-Jun-06 8:29 
GeneralRe: Typedef Pin
Jay0322-Jun-06 8:36
Jay0322-Jun-06 8:36 
GeneralRe: Typedef Pin
Zac Howland22-Jun-06 9:33
Zac Howland22-Jun-06 9:33 
GeneralRe: Typedef Pin
Michael Dunn22-Jun-06 10:43
sitebuilderMichael Dunn22-Jun-06 10:43 
GeneralRe: Typedef Pin
Alexander M.,22-Jun-06 16:04
Alexander M.,22-Jun-06 16:04 
Questionlong data type with 64-bit Pin
Alexander M.,22-Jun-06 6:57
Alexander M.,22-Jun-06 6:57 
AnswerRe: long data type with 64-bit Pin
Zac Howland22-Jun-06 7:01
Zac Howland22-Jun-06 7:01 

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.