Click here to Skip to main content
15,886,806 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Naveen15-Sep-09 23:45
Naveen15-Sep-09 23:45 
GeneralRe: Drawing lines, shapes on bitmaps Pin
Game-point15-Sep-09 23:51
Game-point15-Sep-09 23:51 
AnswerRe: Drawing lines, shapes on bitmaps - use Image Viewer Pin
Iain Clarke, Warrior Programmer15-Sep-09 21:17
Iain Clarke, Warrior Programmer15-Sep-09 21:17 
QuestionUse CEdit control in VC2005 Pin
liu3p15-Sep-09 17:13
liu3p15-Sep-09 17:13 
AnswerRe: Use CEdit control in VC2005 Pin
Naveen15-Sep-09 17:46
Naveen15-Sep-09 17:46 
GeneralRe: Use CEdit control in VC2005 Pin
«_Superman_»15-Sep-09 19:35
professional«_Superman_»15-Sep-09 19:35 
GeneralRe: Use CEdit control in VC2005 Pin
liu3p15-Sep-09 19:53
liu3p15-Sep-09 19:53 
QuestionWhat is wrong with this program? Pin
belleissexy33315-Sep-09 13:11
belleissexy33315-Sep-09 13:11 
#include<stdio.h>
#define abs(x) ((x<0)?(-(x)):(x))
#define epsilon .000000000001
#define size 5
double multiply(a,m,product)
double a[size][size],product [size][size];
int *m;
{
int test=0;
int count,i,j,k,l;
double olda[size][size],diff;
for(i=0;i<*m;i++)
for(j=0;j(* m;j++)
olda[i][j]=a[i][j];
for(count=1;count<=1000;count++)
{
for(i=0;i<*m;i++)
for(j=0;j<*m;j++)
product[i][j]=0;
for(i=0;i<*m;i++)
for(j=0;j<*m;j++)
for(k=0;k<*m;k++)
product[i][j]=product[i][j]+a[i][k]*olda[k][j];
for(i=0;i<*m;i++)
for(j=0;j<*m;j++)
{
diff=abs(product[i][j]-olda[i][j]);
if(diff>epsilon)
{
test=1;
for(k=0;k<*m;k++)
for(l=0;l<*m;l++)
olda[k][l]=product[k][l];
}
break;
if(test<1)
{
printf("\nThe numberof iterations is:");
printf("\n");
printf("\n %d",count);
break;
}
test=0;
}
return(0);
}
main()
{
static double a[size][size]={{0.1,1.0,0.0,0.0,0.0},
{0.0,0.0,0.3,0.7,0.0},
{0.0,0.0,0.0,0.2,0.8},
{0.0,0.0,0.1,0.0,0.9},
{1.0,0.0,0.0,0.0,0.0}};
double product[size][size],pi[size],diff;
int test;
int m=size;
int i j;
multiply(a,&m,product);
printf("\n");
printf((" \nThe product is:");
printf("\n");
for(i=0;i<m;i<m;i++)
{
printf("\n");
for(j=0;j<m;j++)
printf(" %15.12f", product[i][j]);
}
printf("\n");
printf("n");
return(0);
}


I got the following error messages when I tried to compile it.
Error 1 error C2065: 'a' : undeclared identifier
Error 2 error C2065: 'm' : undeclared identifier
Error 3 error C2065: 'product' : undeclared identifier
Error 4 error C2448: 'multiply' : function-style initializer appears to be a function definition
Error 5 fatal error C1004: unexpected end-of-file found


Please help me I have been trying to figure out how to fix it.
Thanks
AnswerRe: What is wrong with this program? Pin
Chris Losinger15-Sep-09 14:55
professionalChris Losinger15-Sep-09 14:55 
AnswerRe: What is wrong with this program? Pin
Iain Clarke, Warrior Programmer15-Sep-09 21:19
Iain Clarke, Warrior Programmer15-Sep-09 21:19 
QuestionPassword recovery for .LIB file Pin
DallasProgrammer15-Sep-09 6:36
DallasProgrammer15-Sep-09 6:36 
AnswerRe: Password recovery for .LIB file Pin
Stuart Dootson15-Sep-09 6:56
professionalStuart Dootson15-Sep-09 6:56 
GeneralRe: Password recovery for .LIB file Pin
DallasProgrammer15-Sep-09 8:27
DallasProgrammer15-Sep-09 8:27 
GeneralRe: Password recovery for .LIB file Pin
Cedric Moonen15-Sep-09 8:45
Cedric Moonen15-Sep-09 8:45 
GeneralRe: Password recovery for .LIB file Pin
«_Superman_»15-Sep-09 19:38
professional«_Superman_»15-Sep-09 19:38 
QuestionRe: Password recovery for .LIB file Pin
David Crow15-Sep-09 9:35
David Crow15-Sep-09 9:35 
AnswerRe: Password recovery for .LIB file Pin
Chris Losinger15-Sep-09 12:06
professionalChris Losinger15-Sep-09 12:06 
QuestionRe: Password recovery for .LIB file Pin
Maximilien15-Sep-09 9:42
Maximilien15-Sep-09 9:42 
QuestionQuestion on g++ compiler options Pin
minkowski15-Sep-09 6:23
minkowski15-Sep-09 6:23 
AnswerRe: Question on g++ compiler options Pin
Stuart Dootson15-Sep-09 7:06
professionalStuart Dootson15-Sep-09 7:06 
GeneralRe: Question on g++ compiler options Pin
minkowski15-Sep-09 22:47
minkowski15-Sep-09 22:47 
GeneralRe: Question on g++ compiler options Pin
Stuart Dootson15-Sep-09 23:33
professionalStuart Dootson15-Sep-09 23:33 
GeneralRe: Question on g++ compiler options Pin
minkowski16-Sep-09 0:29
minkowski16-Sep-09 0:29 
GeneralRe: Question on g++ compiler options Pin
Stuart Dootson16-Sep-09 0:37
professionalStuart Dootson16-Sep-09 0:37 
GeneralRe: Question on g++ compiler options Pin
minkowski16-Sep-09 1:00
minkowski16-Sep-09 1:00 

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.