From 29e4a0c8f7f7e3a7ba975aeaa90a2bfafda99261 Mon Sep 17 00:00:00 2001 From: KleptsovKD Date: Wed, 5 Feb 2025 00:56:08 +0300 Subject: [PATCH] Added line input using fgets --- lab04.1/main.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lab04.1/main.cpp b/lab04.1/main.cpp index 91bafa5..8b4fe99 100644 --- a/lab04.1/main.cpp +++ b/lab04.1/main.cpp @@ -1,10 +1,15 @@ -#include // Äëÿ fgets() -#include // Äëÿ strspn(), strcspn() -#include // Äëÿ cout +#include +#include +#include const size_t MAX_SIZE = 256; const char* SEPARATORS = " \r\n,.!?:;()-"; int main() { + char text[MAX_SIZE] = {0}; + + std::cout << "Enter the line: "; + fgets(text, MAX_SIZE, stdin); + return 0; }