Click here to Skip to main content
15,887,596 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionperformance counter issue Pin
De@r3-Aug-09 3:13
De@r3-Aug-09 3:13 
QuestionRe: performance counter issue Pin
David Crow3-Aug-09 3:52
David Crow3-Aug-09 3:52 
QuestionFailing Debug vs Working Release ? Pin
od@ananzi.co.za3-Aug-09 2:01
od@ananzi.co.za3-Aug-09 2:01 
AnswerRe: Failing Debug vs Working Release ? Pin
Souldrift3-Aug-09 4:48
Souldrift3-Aug-09 4:48 
GeneralRe: Failing Debug vs Working Release ? Pin
od@ananzi.co.za3-Aug-09 5:18
od@ananzi.co.za3-Aug-09 5:18 
GeneralRe: Failing Debug vs Working Release ? Pin
Souldrift3-Aug-09 5:32
Souldrift3-Aug-09 5:32 
GeneralRe: Failing Debug vs Working Release ? Pin
od@ananzi.co.za3-Aug-09 7:34
od@ananzi.co.za3-Aug-09 7:34 
QuestionI need help with my code Pin
bzz073-Aug-09 1:39
bzz073-Aug-09 1:39 
First of all, sorry for my bad english.. I need help with my c code..

void Calculate()
{	
	for (int i=0;i<1;i++)
	{
		for(int j=0;j<3;j++)
		{
			
			c[i][j] = x[i][j] * w[i][j];
			sum1 += c[i][j];
		
			printf("Output[%d]: %.1f ",i+1,c[i][j]);
		}
		printf("\n");
		printf("Sum: %.1f\n",sum1);
	}
	printf("\n");

	for (int i=1;i<2;i++)
	{
		for(int j=0;j<3;j++)
		{
			
			c[i][j] = x[i][j] * w[i][j];
			sum2 += c[i][j];
		
			printf("Output[%d]: %.1f ",i+1,c[i][j]);
		}
		printf("\n");
		printf("Sum: %.1f\n",sum2);
	}
	printf("\n");

	for (int i=2;i<3;i++)
	{
		for(int j=0;j<3;j++)
		{
			
			c[i][j] = x[i][j] * w[i][j];
			sum3 += c[i][j];
		
			printf("Output[%d]: %.1f ",i+1,c[i][j]);
		}
		printf("\n");
		printf("Sum: %.1f\n",sum3);
	}
	printf("\n");

	for (int i=3;i<4;i++)
	{
		for(int j=0;j<3;j++)
		{
			
			c[i][j] = x[i][j] * w[i][j];
			sum4 += c[i][j];
		
			printf("Output[%d]: %.1f ",i+1,c[i][j]);
		}
		printf("\n");
		printf("Sum: %.1f\n",sum4);
	}
	printf("\n");
}


how can i make this code become simple? its a sum of each row.. it has 4 row, sum1 is the sum for the first row only.. and sum2 is the sum for the second row only and so on.. please help me on how to make this code simpler cause i think its redundant.. thanx..
AnswerRe: I need help with my code Pin
Luc Pattyn3-Aug-09 2:17
sitebuilderLuc Pattyn3-Aug-09 2:17 
GeneralRe: I need help with my code Pin
bzz073-Aug-09 2:32
bzz073-Aug-09 2:32 
QuestionSetProxy function throwing exception Pin
Ash_VCPP3-Aug-09 1:39
Ash_VCPP3-Aug-09 1:39 
AnswerRe: SetProxy function throwing exception Pin
Bacon Ultimate Cheeseburger3-Aug-09 12:55
Bacon Ultimate Cheeseburger3-Aug-09 12:55 
GeneralRe: SetProxy function throwing exception Pin
Ash_VCPP3-Aug-09 20:40
Ash_VCPP3-Aug-09 20:40 
GeneralRe: SetProxy function throwing exception Pin
Bacon Ultimate Cheeseburger3-Aug-09 21:56
Bacon Ultimate Cheeseburger3-Aug-09 21:56 
GeneralRe: SetProxy function throwing exception Pin
Ash_VCPP3-Aug-09 22:32
Ash_VCPP3-Aug-09 22:32 
QuestionUINT ThreadProc ( LPVOID param ) Pin
susanne13-Aug-09 1:12
susanne13-Aug-09 1:12 
AnswerRe: UINT ThreadProc ( LPVOID param ) Pin
CPallini3-Aug-09 1:23
mveCPallini3-Aug-09 1:23 
GeneralRe: UINT ThreadProc ( LPVOID param ) Pin
susanne13-Aug-09 3:24
susanne13-Aug-09 3:24 
GeneralRe: UINT ThreadProc ( LPVOID param ) Pin
CPallini3-Aug-09 11:46
mveCPallini3-Aug-09 11:46 
QuestionRe: UINT ThreadProc ( LPVOID param ) Pin
David Crow3-Aug-09 3:55
David Crow3-Aug-09 3:55 
AnswerRe: UINT ThreadProc ( LPVOID param ) Pin
susanne13-Aug-09 5:23
susanne13-Aug-09 5:23 
QuestionRe: UINT ThreadProc ( LPVOID param ) Pin
David Crow3-Aug-09 5:26
David Crow3-Aug-09 5:26 
AnswerRe: UINT ThreadProc ( LPVOID param ) Pin
Michael Dunn3-Aug-09 9:48
sitebuilderMichael Dunn3-Aug-09 9:48 
QuestionNon Ovelapped Serial I/O Pin
sunny_vc2-Aug-09 23:37
sunny_vc2-Aug-09 23:37 
AnswerRe: Non Ovelapped Serial I/O Pin
«_Superman_»2-Aug-09 23:54
professional«_Superman_»2-Aug-09 23:54 

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.