Click here to Skip to main content
15,905,686 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: fopen Pin
cnd1200125-Jun-03 22:08
cnd1200125-Jun-03 22:08 
GeneralOld School Help Needed Pin
juglugs24-Jun-03 10:44
juglugs24-Jun-03 10:44 
GeneralRe: Old School Help Needed Pin
John R. Shaw24-Jun-03 11:11
John R. Shaw24-Jun-03 11:11 
GeneralRe: Old School Help Needed Pin
juglugs25-Jun-03 6:39
juglugs25-Jun-03 6:39 
GeneralRe: Old School Help Needed Pin
basementman24-Jun-03 11:12
basementman24-Jun-03 11:12 
GeneralPlotting wave files Pin
Juan Carlos Cobas24-Jun-03 10:36
Juan Carlos Cobas24-Jun-03 10:36 
GeneralCRichEditCtrl and Select All Functionality Pin
ScottPrusinoski24-Jun-03 10:05
ScottPrusinoski24-Jun-03 10:05 
Generalerror with creating a pointer to a struct Pin
johnstonsk24-Jun-03 9:53
johnstonsk24-Jun-03 9:53 
I am trying to create a pointer to a struct, but I keep getting errors.
I have been converting a *.c file to c++ and I am not too familuar with C.

I need to know the size of each one so I know what offset in memory to access the data.

i.e. if the header is 16 bytes long then I know anything larger than 16 bytes is the data values that I need.

I want to be able to access
SimSignal->Min[i];
SimSignal->Max[i];
SimSignal->Value[i];
SimSignal->Name[i];
SimSignal->Unit[i];

All of this data is related to one another.

I hope this makes sense.

Thanks for the help,
Steven



<br />
#define SIMHEAD_ADR 0x40 //This is the hardcoded address of the SimHeader (only hard coded address to RFM)<br />
<br />
<br />
	struct TSimHeader<br />
	{<br />
		int SimWriteFlag;	<br />
		int DisplayReadFlag;					<br />
		int SignalCount;		<br />
		int SimStatus;<br />
	};<br />
<br />
	<br />
struct TSimSignal<br />
	{<br />
		double Min[88];	  //signal min value<br />
		double Max[88];	  //siganl max value<br />
		double Value[88]; //signal value<br />
		char Name[88];//signal name<br />
		char Unit[88];//signal unit<br />
	};<br />
<br />
<br />
<br />
<br />
TSimHeader* SimHeader= SIMHEAD_ADR;<br />
TSimSignal* SimSignal= SimHeader+sizeof(TSimHeader);<br />
<br />
<br />



d:\.....h(42) : error C2258: illegal pure syntax, must be '= 0'
d:\.....h(42) : error C2252: 'SimHeader' : pure specifier can only be specified for functions
d:\.....h(43) : error C2065: 'SimHeader' : undeclared identifier

GeneralRe: error with creating a pointer to a struct Pin
Michael Dunn24-Jun-03 10:56
sitebuilderMichael Dunn24-Jun-03 10:56 
GeneralRe: error with creating a pointer to a struct Pin
basementman24-Jun-03 11:16
basementman24-Jun-03 11:16 
GeneralRe: error with creating a pointer to a struct Pin
John R. Shaw24-Jun-03 11:38
John R. Shaw24-Jun-03 11:38 
GeneralResource Editor Pin
butterbean73024-Jun-03 9:20
butterbean73024-Jun-03 9:20 
GeneralI don't inderstand these errors Pin
johnstonsk24-Jun-03 9:06
johnstonsk24-Jun-03 9:06 
GeneralRe: I don't inderstand these errors Pin
peterchen24-Jun-03 9:29
peterchen24-Jun-03 9:29 
GeneralRe: I don't inderstand these errors Pin
johnstonsk24-Jun-03 9:31
johnstonsk24-Jun-03 9:31 
GeneralRe: I don't inderstand these errors Pin
Anonymous24-Jun-03 9:52
Anonymous24-Jun-03 9:52 
GeneralMFC question: scrolling window Pin
Charles Léonard24-Jun-03 8:56
Charles Léonard24-Jun-03 8:56 
Generalhave code for icon association w/eVb and eVC++...but... Pin
shirleyLo24-Jun-03 8:46
shirleyLo24-Jun-03 8:46 
GeneralProcess vs. Thread priority. Pin
Simon Steele24-Jun-03 6:06
Simon Steele24-Jun-03 6:06 
GeneralRe: Process vs. Thread priority. Pin
valikac24-Jun-03 7:26
valikac24-Jun-03 7:26 
GeneralRe: Process vs. Thread priority. Pin
peterchen24-Jun-03 9:49
peterchen24-Jun-03 9:49 
Generalhelp to display pixels,many thanks. Pin
Anonymous24-Jun-03 6:01
Anonymous24-Jun-03 6:01 
GeneralRe: help to display pixels,many thanks. Pin
David Crow24-Jun-03 7:24
David Crow24-Jun-03 7:24 
GeneralRe: help to display pixels,many thanks. Pin
basementman24-Jun-03 9:01
basementman24-Jun-03 9:01 
GeneralRe: help to display pixels,many thanks. Pin
John M. Drescher24-Jun-03 16:21
John M. Drescher24-Jun-03 16:21 

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.