c - 未知类型名称?
问题描述
为什么它告诉我“首席”是未知类型名称?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <ctype.h>
FILE*input,*output;
struct chief
{char name[20];
char position[20];
int meals_made;
double salary;
int age;
};
int gainings_and_losses(chief gain[]){
for(int k=0;k<10;k++){
if(gain[k].meals_made>10){
if(gain[k].salary<3000.0){
gain[k].salary=gain[k].salary*2.3;
fprintf(output,"%s salary for will be% \n", gain[k].name,gain[k].salary);
}
else if(gain[k].salery>3000){
gain[k].salary=gain[k].salary*1.4;
fprintf(output,"%s salary for the next month will be% \n", gain[k].name,gain[k].salary);
}
}
我试图在结构之后 int 首席,但代码崩溃了,“首席”仍然未知
解决方案
推荐阅读
- visual-studio - 如何在 GitHub 存储库中包含没有大 .vs 文件夹的项目属性?
- unity3d - 多久调用一次 OnTriggerEnter2D?
- arrays - 如何在 VBA 中重新保存锯齿状数组(数组中的数组)?
- sql - How to store address in database
- java - 安卓。遍历父回收器时嵌套的recyclerview自行滚动
- ssl - 是否可以使用 Telegraf 配置安全(SSL)kafka?
- php - get data of rows that are not set as foreign key in Laravel
- php - 将单个 Laravel 通知标记为已读
- angular - Angular Material Sorting a number assending doesn't work
- java - 带有安全管理器的 Tomcat 9.0 在 Windows 上报告访问被拒绝