Using Namespace Directive

#include <iostream>
using namespace std;

namespace Config {
    int baudRate = 9600;
    int threshold = 50;
}

int main() {
    using namespace Config;

    cout << "Baud: "<< baudRate <<", " << "Threshold: " << threshold;

    return 0;
}

Solving Approach

 

 

 

 

 

Upvote
Downvote
Loading...

Input

Expected Output

Baud: 9600, Threshold: 50