#include <iostream>
#include <fstream>
#include <sstream>
#include <string>

using namespace std;

int main()
{
    // string input;               //need to declare user input first
    // cout << "Please enter the file you wish to be counted." << endl;
    // cin >> input;
    // ifstream cppfile(input);    //user specified file is opened here
    
    istringstream cppfile(
    	"    // comment\n"
    	"    // comment\n"
    	"    // comment\n"
    	"    // comment\n"
    	"    // comment\n"
    	"    // comment\n"
    	"    // comment\n"
    	);
    
    string line;                //used to store lines in the file
    
    int counter = 0;
    
    // if(!cppfile.is_open()){
    //     cout << "Cannot open that file, try again." << endl;
    // }
    
    // else{
        while(getline(cppfile,line))
        {
            if(line.find("//") == 0){
                continue;           //exclude any single lone comments
            }
            if(line.find("{" or "}") == 0){
                continue;           //exclude any brackets
            }
            else if(line.empty()){
                continue;           //exclude empty lines
            }
            ++counter;
        }
        // cppfile.close();
        cout << "Number of Lines: " << counter << endl;
    // }
}