crt secure no warnings in c++

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>

int main() {
    char str[100];

    // Using safe CRT function to read input
    if (scanf("%99s", str) == 1) {
        // Printing the input
        std::cout << "Input: " << str << std::endl;
    }

    return 0;
}