Click here to Skip to main content
15,924,828 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Resource folder is missing? Pin
DaveE9th1-Jul-03 4:59
DaveE9th1-Jul-03 4:59 
GeneralQuick Instance Handle Question Pin
fluxt30-Jun-03 9:26
fluxt30-Jun-03 9:26 
GeneralRe: Quick Instance Handle Question Pin
Peter Weyzen30-Jun-03 9:31
Peter Weyzen30-Jun-03 9:31 
GeneralRe: Quick Instance Handle Question Pin
fluxt30-Jun-03 9:37
fluxt30-Jun-03 9:37 
GeneralRe: Quick Instance Handle Question Pin
basementman30-Jun-03 11:14
basementman30-Jun-03 11:14 
GeneralSocks Proxy in Winsock :: Winsock Pin
valikac30-Jun-03 8:54
valikac30-Jun-03 8:54 
GeneralRe: Socks Proxy in Winsock :: Winsock Pin
Peter Weyzen30-Jun-03 9:19
Peter Weyzen30-Jun-03 9:19 
Generalcreating an array of the corect size Pin
johnstonsk30-Jun-03 7:52
johnstonsk30-Jun-03 7:52 
I am trying to create an array of structures (struct TSimSignal) that are of the size of SignalCount in the TSimHeader struct

Below is the structure that I have created:

<br />
struct TSimSignal<br />
	{<br />
		<br />
		double Value[45];<br />
		int SimWriteFlag;<br />
		int data_index;<br />
		int DisplayReadFlag;<br />
		long TimeStamp;<br />
	<br />
	};<br />
<br />
<br />
 struct TSimHeader<br />
	{<br />
		char   *Name[45];<br />
		char   *Unit[45];<br />
		double  Min[45];	  <br />
		double  Max[45];					<br />
		int SignalCount;		<br />
		int SimStatus;<br />
		<br />
	};<br />
<br />
//this is what I am trying to do<br />
<br />
struct TSimSignal signal_str[TSimHeader.SignalCount];<br />
int *data_index_ptr[TSimHeader.SignalCount];<br />
double *data_ptr[TSimHeader.SignalCount];<br />
<br />


How can I create these arrays with the size of SignalCount?

I know that I have to have a const to set the size of the array, but not sure how to make the const = to SignalCount;

SignalCount is set when A file is read in. It does a count and then sets the number for SignalCount.

thanks,Smile | :)
sj
GeneralRe: creating an array of the corect size Pin
David Crow30-Jun-03 8:22
David Crow30-Jun-03 8:22 
GeneralRe: creating an array of the corect size Pin
Dean Goodman30-Jun-03 8:52
Dean Goodman30-Jun-03 8:52 
GeneralRe: creating an array of the corect size Pin
johnstonsk30-Jun-03 9:13
johnstonsk30-Jun-03 9:13 
GeneralRe: creating an array of the corect size Pin
johnstonsk30-Jun-03 9:21
johnstonsk30-Jun-03 9:21 
GeneralRe: creating an array of the corect size Pin
johnstonsk30-Jun-03 9:26
johnstonsk30-Jun-03 9:26 
GeneralCOnvert CEdit to string Pin
keegan30-Jun-03 7:15
keegan30-Jun-03 7:15 
GeneralRe: COnvert CEdit to string Pin
David Crow30-Jun-03 7:25
David Crow30-Jun-03 7:25 
GeneralRe: COnvert CEdit to string Pin
keegan30-Jun-03 7:57
keegan30-Jun-03 7:57 
GeneralRe: COnvert CEdit to string Pin
David Crow30-Jun-03 8:20
David Crow30-Jun-03 8:20 
GeneralRe: COnvert CEdit to string Pin
keegan30-Jun-03 9:09
keegan30-Jun-03 9:09 
GeneralRe: COnvert CEdit to string Pin
David Crow30-Jun-03 9:53
David Crow30-Jun-03 9:53 
GeneralRe: COnvert CEdit to string Pin
keegan30-Jun-03 9:58
keegan30-Jun-03 9:58 
GeneralDirectDraw Palette Pin
Kuniva30-Jun-03 6:07
Kuniva30-Jun-03 6:07 
GeneralDebugger won't startup when app crashes Pin
John Oliver30-Jun-03 6:01
John Oliver30-Jun-03 6:01 
GeneralRe: Debugger won't startup when app crashes Pin
David Crow30-Jun-03 7:32
David Crow30-Jun-03 7:32 
GeneralRe: Debugger won't startup when app crashes Pin
John Oliver30-Jun-03 21:44
John Oliver30-Jun-03 21:44 
GeneralVirtual KeyCodes error: undeclared identifier Pin
fluxt30-Jun-03 5:48
fluxt30-Jun-03 5:48 

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.