NOTE
NOTE
src idea```
//genated by GPT (wrtn.ai)
//"This source code follows OpenAI's policy."
//prompt lang = ko
//Q. C 구조체 예제
struct Student {
int id;
char name[50];
float grade;
}
//Q. C union 예제
union Data {
int intValue;
float floatValue;
char charValue;
}
```
이하 내용은 GPT에게 의존하지 않고 프롬프팅을 위해 준비한 소스이다.
심심하기도 하고, 아이디어 뺏기기 싫어서 명시해놓는다.
tmp1.h```
#ifndef _TMP1_H
# define _TMP1_H
using UINT _unsigned_value;
#endif
```
struct1.h```
#ifndef _STRUCT1_H
# define _STRUCT1_H
template <UINT L> class Student {
public:
int id;
char name[L];
float grade;
Student(int id, char * name, float grade)
{
this->id = id;
this->name = name;
this->grade = grade;
}
}
#endif
```
union1.h```
#ifndef _UNION_H
# define _UNION_H
union Data {
int intValue;
float floatValue;
char charValue;
}
#endif
```
umm.cpp```
//I deleted some data.
using std::_is_unsigned_value;
#include “tmp1.h”
#include “struct1.h”
```
히히