|  |
| |
U_SoRang |
#include <stdio.h>
#include <windows.h>
#include <string.h>
void refresh();
void word_del(char_input);
int i;
char *word[] = {"°íµå¸§","¼Ò³ª±â","¾È°³ºñ","»ê¼ººñ"};
void main()
{
char *input[20];
refresh();
printf("±ÛÀÚ ÀÔ·Â : "); scanf("%s",input);
word_del(input);
}
void refresh()
{
system("cls");
for(i=0;i<4;i++) printf("%s ",word[i]);
puts("");
}
void word_del(char_input)
{
for(i=0;i<4;i++)
{
switch(strcoll(word[i], char_input))
{
case 0: word[i] = NULL; refresh(); break;
default: refresh; break;
}
}
} |
2013/11/18 |
|
| ±×´Ï |
u_sorang//À½... ÄÄÆÄÀÏ ¿À·ù°¡¶°¿ä...
error C2065: 'char_input' : undeclared identifier
error C2182: 'word_del' : illegal use of type 'void'
error C2064: term does not evaluate to a function
error C2448: '<Unknown>' : function-style initializer appears to be a function definition |
2013/11/18 |
|
| MainThread |
word_delÀÇ ¸Å°³º¯¼ö¸¦ ¹Ù²ãº¸¼¼¿ä
char input[20];
char *word[20] = {"°íµå¸§","¼Ò³ª±â","¾È°³ºñ","»ê¼ººñ"};
void refresh()
{
int i;
for(i=0;i<4;i++)
{
printf("%s\n",word[i]);
}
}
void word_del(char *input, char *word[20])
{
for(int i=0; i<4; i++)
{
if(strcmp(input,word[i])==0)
{
word[i]=NULL;
}
}
refresh();
}
void main()
{
refresh();
//printf("±ÛÀÚ ÀÔ·Â : ");
//scanf("%s",input);
strcpy(input,"¼Ò³ª±â");
word_del(input,word);
}
From MainThread |
2014/05/24 |
|