43. Using Namespace Directive

Back To All Submissions
Previous Submission
Next Submission
#include <iostream>
using namespace std;

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

int main() {
    // your code here: add using namespace statement
    // your code here: print baudRate and threshold
    
    using namespace Config;
    cout<< "Baud: " << baudRate << ',' 
        << " Threshold: " << threshold ;

    return 0;
}

Standard syntaxing

 

 

 

 

 

Was this helpful?
Upvote
Downvote