#pragma warning(disable : 4996)

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

#include<string.h>

typedef struct Student {

char name[50];

int age;

char address[20];

char stno[10];

}; St;

int main() {

St st1, temp_st;

int i = 0, j = 0;



strcpy(st1[0].name, "홍길동1");

st1[0].age = 25;

strcpy(st1[0].address, "AA st.ba");

strcpy(st1[0].stno, "2022312178");



strcpy(st1[1].name, "홍길동2");

st1[1].age = 22;

strcpy(st1[1].address, "AA st.bb");

strcpy(st1[1].stno, "2022142178");



strcpy(st1[2].name, "홍길동3");

st1[2].age = 21;

strcpy(st1[2].address, "AA st.bc");

strcpy(st1[2].stno, "2022367178");



strcpy(st1[3].name, "홍길동4");

st1[3].age = 29;

strcpy(st1[3].address, "AA st.bd");

strcpy(st1[3].stno, "2022398178");



strcpy(st1[4].name, "홍길동5");

st1[4].age = 28;

strcpy(st1[4].address, "AA st.be");

strcpy(st1[4].stno, "2022333178");



for (i = 0; i < 5; i++) {

  for (j = 0; j < 5 - i; j++) {

   if (st1[j].age > st1[j + 1].age) {

    temp_st = st1[j];

    st1[j] = st1[j + 1];

    st1[j + 1] = temp_st;

   }

  }

}

for (i = 0; i < 5; i++) {

  printf("%s\n", st1[i].name);

  printf("%d\n", st1[i].age);

  printf("%s\n", st1[i].address);

  printf("%s\n", st1[i].stno);

  printf("ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ\n");



}



return 0;

}

st1,temp_st가 정의되어있지않다고하는데 어떻게 바꿔야하나요?