c 초보입니다.
글쓴이: oilsok / 작성시간: 토, 2005/04/16 - 11:57오후
#include <stdio.h> #include <string.h> void main() { char str[10]; strcpy(str,"string"); printf("%s\n",str); str[1]='A'; printf("%s\n',str); }
이렇게 하고 저장하고 컴파일 하려니까,,글쎄..
knut% ls test test.c test2.c knut% gcc -o test2 test2.c test2.c:9: unterminated string or character constant test2.c:9: possible real start of unterminated constant knut%
이렇게 나오네요 ㅡㅡ 왜그러져?
Forums:
아...문법 오류를 발견하고..
printf("%s\n',str);
수정 하고 다시 컴파일 하니까 이번엔..
도대체 어쩌라는 건지 ㅡㅡ
그냥 경고 입니다.컴파일 정상적으로 된겁니다....경고를 없애시려
그냥 경고 입니다.
컴파일 정상적으로 된겁니다....
경고를 없애시려면
void main() -> int main()
하시고
main 마지막 줄에
return 0;
해주시면 됩니다.
웃어요^,.^;
[code:1]printf("%s\n',str);
printf("%s\n',str);
인가요
printf("%s\n",str);
[code:1]printf("%s\n",str&
printf("%s\n",str);
댓글 달기