Click here to Skip to main content
16,011,475 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMultithreading Pin
AslFunky10-Dec-04 23:25
AslFunky10-Dec-04 23:25 
GeneralRe: Multithreading Pin
Gary R. Wheeler11-Dec-04 2:14
Gary R. Wheeler11-Dec-04 2:14 
GeneralRe: Multithreading Pin
AslFunky12-Dec-04 21:23
AslFunky12-Dec-04 21:23 
GeneralRe: Multithreading Pin
Gary R. Wheeler13-Dec-04 4:08
Gary R. Wheeler13-Dec-04 4:08 
GeneralRe: Multithreading Pin
faroqtam11-Dec-04 9:25
faroqtam11-Dec-04 9:25 
GeneralRetrieving Data from a Dialog box Pin
aaadetos10-Dec-04 22:49
aaadetos10-Dec-04 22:49 
GeneralRe: Retrieving Data from a Dialog box Pin
Gary R. Wheeler11-Dec-04 2:18
Gary R. Wheeler11-Dec-04 2:18 
Generalcannot convert parameter 1 from 'ArrayType [7]' to 'int []' Pin
sacoskun10-Dec-04 21:22
sacoskun10-Dec-04 21:22 
const int MIN_ELEMENTS = 5;<br />
typedef int ArrayType[MIN_ELEMENTS];<br />
typedef int ElementType;<br />
<br />
bool findSum( ArrayType myArray, int n )<br />
{<br />
	ElementType firstFiveSum = 0;<br />
	bool isSuccess = true;<br />
<br />
	if( n < MIN_ELEMENTS )<br />
	{<br />
		isSuccess = false;<br />
	}<br />
	else<br />
	{<br />
		for( int index = 0; MIN_ELEMENTS > index; ++index )<br />
		{<br />
			if( !( myArray[index] < 0 ) )<br />
			{<br />
				firstFiveSum += myArray[index];<br />
			}<br />
			else<br />
			{<br />
				isSuccess = false;<br />
				firstFiveSum = 0;<br />
				break;<br />
			}<br />
		}<br />
	}<br />
<br />
	std::cout << firstFiveSum << "\n";<br />
<br />
	return isSuccess;<br />
}<br />
<br />
int main()<br />
{<br />
	const int FIRST_ARRAY_SIZE = 7;<br />
	const int SECOND_ARRAY_SIZE = 3;<br />
<br />
	ArrayType myFirstArray[FIRST_ARRAY_SIZE] = {1,1,1,1,1,1,1};<br />
	ArrayType mySecondArray[SECOND_ARRAY_SIZE] = {1,1,1};<br />
<br />
	findSum( myFirstArray, FIRST_ARRAY_SIZE );<br />
	<br />
	return 0;<br />
}


Visual Studio compiler gives an error like;

cannot convert parameter 1 from 'ArrayType [7]' to 'int []'

How can I solve this?

Thanks in advance.

-
When in doubt, push a pawn!
-
GeneralRe: cannot convert parameter 1 from 'ArrayType [7]' to 'int []' Pin
Michael Dunn11-Dec-04 4:52
sitebuilderMichael Dunn11-Dec-04 4:52 
Generaltis abt getting keyboard eventz in a dialog box having many windows in it!!!!! Pin
namaskaaram10-Dec-04 19:21
namaskaaram10-Dec-04 19:21 
GeneralRe: tis abt getting keyboard eventz in a dialog box having many windows in it!!!!! Pin
John R. Shaw10-Dec-04 20:15
John R. Shaw10-Dec-04 20:15 
Generalmouse hooking Pin
Member 52815510-Dec-04 19:13
Member 52815510-Dec-04 19:13 
GeneralRe: mouse hooking Pin
John R. Shaw10-Dec-04 20:46
John R. Shaw10-Dec-04 20:46 
GeneralRe: mouse hooking Pin
Member 52815510-Dec-04 22:02
Member 52815510-Dec-04 22:02 
GeneralRe: mouse hooking Pin
John R. Shaw14-Dec-04 7:35
John R. Shaw14-Dec-04 7:35 
GeneralUpdateresource sample needed Pin
includeh1010-Dec-04 18:02
includeh1010-Dec-04 18:02 
GeneralRe: Updateresource sample needed Pin
John R. Shaw10-Dec-04 18:51
John R. Shaw10-Dec-04 18:51 
GeneralRe: Updateresource sample needed Pin
Gary R. Wheeler11-Dec-04 2:21
Gary R. Wheeler11-Dec-04 2:21 
QuestionMenu not loading???? Pin
ashsri10-Dec-04 16:13
ashsri10-Dec-04 16:13 
AnswerRe: Menu not loading???? Pin
John R. Shaw10-Dec-04 21:19
John R. Shaw10-Dec-04 21:19 
GeneralRe: Menu not loading???? Pin
ashsri11-Dec-04 4:47
ashsri11-Dec-04 4:47 
QuestionDLL: GetProcAddress() always returns NULL?? Pin
registering10-Dec-04 12:03
registering10-Dec-04 12:03 
AnswerRe: DLL: GetProcAddress() always returns NULL?? Pin
Mike Dimmick10-Dec-04 12:23
Mike Dimmick10-Dec-04 12:23 
GeneralRe: DLL: GetProcAddress() always returns NULL?? Pin
registering10-Dec-04 12:54
registering10-Dec-04 12:54 
GeneralRe: DLL: GetProcAddress() always returns NULL?? Pin
Gary R. Wheeler11-Dec-04 2:23
Gary R. Wheeler11-Dec-04 2:23 

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.