c语言int doubt,c语言错误error: incompatible types in assignment

#include

#include

#include

#define MAXLEN 100

typedef int ElemType;

typedef struct

{

int i,j;// 行下标,列下标

ElemType e;         //元素值

} Doubtle;

typedef struct

{   Doubtle data[MAXLEN+1]; // 非零元三元组表,data[0]未用

int m,n,t;// 矩阵的行数、列数和元素个数

} Matrix;

int InitMatrix(Matrix *M)

{

*M=(Matrix*)malloc(sizeof(Matrix));

}

int MatrixCreat(Matrix M)

{   int a,b;

srand((int)time(NULL));

a=rand()%10+1;

b=rand()%10+1;

M.m=a;

M.n=b;

M.t=a*b;

int i,j,e;

for(e=1;e<=M.t;e++)

{for(i=1;i<=M.m;i++)

{for(j=1;j<=M.n;j++)

{srand((int)time(NULL));

M.data[e].e=rand()%50+1;

M.data[e].i=i;

M.data[e].j=j;

e++;

}

}

}

}

// 输出矩阵M

void PrintSMatrix(Matrix M)

{

int i;

printf("\n %d 行, %d 列, %d 个元素。\n",M.m, M.n, M.t);

printf("%4s %4s %8s\n", "i", "j", "e");

printf("======================\n");

for(i=1; i<=M.t; i++)

printf("%4d %4d %8d\n", M.data[i].i, M.data[i].j, M.data[i].e);

}

void qiuanma(Matrix M)

{

int q,p;

int MAX=0,MIN=100;

int lie,hang;

int anma;

for(q=1;q<=M.m;q++)

{

for(p=1;p<=M.n;p++)

{

if(M.data[p].e>MAX)

{MAX=M.data[p].e;

lie=M.data[p].j;}

}

if(M.data[q].e

{MIN=M.data[q].e;

hang=M.data[q].i;

}

}

if(MIN==MAX)

{anma=MIN;}

printf("\n鞍马点为第%d行第%d列,元素值为%d",hang,lie,anma);

}

int main(int argc, char *argv[])

{   Matrix *T;

InitMatrix(T);

MatrixCreat(*T);

PrintSMatrix(*T);

qiuanma(*T);

return 0;

}

我想创建一个随机矩阵,然后求它的鞍马点的行列以及值,但是给矩阵分配空间的时候好像出了问题

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Sure, I can help you with that. Here's an article that answers your question: Comparing the Treatment of People with Good Looks and Those with Average Looks in Job Applications There is no doubt that people with good looks tend to receive more positive attention and admiration from others. But when it comes to job applications, do they also have an advantage over those with average looks? Let's take a closer look and compare the treatment of these two groups of people. Firstly, it is widely acknowledged that appearance plays a role in the initial stage of job applications, where recruiters often screen through resumes and cover letters. People with good looks may have the advantage of grabbing recruiters' attention and making a good first impression. However, this advantage may not last long if their skills and experiences are not up to par. In contrast, people with average looks may not have the same visual appeal, but they may still have the right qualifications and experiences that make them suitable for the job. Secondly, during job interviews, recruiters may unconsciously show bias towards people with good looks. They may be more likely to engage in small talk and make positive comments about their appearance, which can create a more favorable impression. However, the same bias may also make them overlook some of their flaws, such as lack of relevant skills or experiences. For people with average looks, their performance during the interview may be the sole focus, and they may have to work harder to make an impression. Thirdly, the attitude of the prospective employer also matters. Some employers may value appearance more than others, and this can impact the treatment of job applicants. For example, in jobs where physical appearance and social skills are seen as crucial, such as sales and customer service, people with good looks may have an edge. However, in jobs where technical skills and knowledge are more important, such as engineering or finance, appearance may not play a significant role. In conclusion, while people with good looks may have some advantages in the initial stage of job applications, such as attracting attention and making a good first impression, this advantage may not necessarily translate into job offers. Ultimately, it is one's qualifications, experiences, and performance that determine whether they are suitable for the job. Recruiters and employers should focus on these factors rather than being swayed by superficial qualities such as appearance.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值