基本的に文字列として扱われる char* を作成しています。文字列は何度も使用されると想定されています。whileループでチェックしようとするたびに、「終了」するのが正しいかどうかを確認しようとしています...
*セグメンテーション エラーが発生し続けます...何が間違っているのでしょうか?かなりばかげた間違いです。
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char* argv[])
{
char* input = (char*)malloc(sizeof(char));
input = "CONTINUE";
while(strcmp(input, "quit") != 0)
{
printf("%s", "System: ");
scanf("%s", input);
}
return 0;
}