scanf_s

code
// Source.cpp
#define _CRT_SECURE_NO_WARNINGS
#include "Header.h"

int main() {
	char input[100];
	scanf("%[^\n]s", input);
	printf("%s", input);

	return 0;
}
// Header.h
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>

scanf를 썼을때

hello
hello
C:\Users\user\source\repos\cppstudy\Debug\cppstudy1.exe (process 7148) exited with code 0.
Press any key to close this window . . .

scanf_s를 썼을때

hello

C:\Users\user\source\repos\cppstudy\Debug\cppstudy1.exe (process 6416) exited with code -1073741819.
Press any key to close this window . . .

뭐가 문제인지…
아 근데 scanf 안에 %[^\n]s 요건 정규식인가요?

정규식은 아니구요. 포멧스트링의 종류입니다.

http://www.cplusplus.com/reference/cstdio/scanf/

여기 자세히 나와있어요 ㅎㅎㅎ