SetPf
Hello. Can i encapsulate enum class in template?
I know, what i can encapsulate enum class in simple class, and call it like MyClass::MyEnum::EnumValue
Anonymous
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#pragma warning (disable: 4996)
int main () {
FILE * vett1;
int i;
int N [10]; {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
// create the file
vett1 = fopen ("votes.dat", "wb");
if (N! = NULL) {
fwrite (votes, sizeof (int), "10", N);
fclose (vett1);
}
else {
printf ("Error !!");
}
// read file
printf ("I read the contents of the file");
vett1 = fopen ("votes.dat", "rb");
if (N! = NULL) {
// open file
fread (votes, sizeof (int), "10", N);
fclose (vett1);
}
else {
printf ("Error !!");
}
for (i = 0; i <10; i ++) {
printf ("enter the% d votes:", i + 1);
scanf ("% d", & vett1)
vett [i] = vett1;
}
fclose (vett1);
}
else {
printf ("Error !!");
}
N = fopen ("media.dat", "wb");
if (N! = NULL) {
fwrite (average, sizeof (int), "10", N);
fclose (N);
}
else {
printf ("Error !!");
}
for (i = 0; i <10; i ++) {
printf ("the average of the marks is% d:", i + 1);
printf ("\ nSufficient> = 6);
}
fclose (vett1);
}
else {
printf ("Error !!");
}
}