unsigned int SLOC_2( std::fstream *inFile)
{
    unsigned loc = 0;
    bool singleLineComment = false;
    bool multiLineComment = false;
    unsigned int stringLen = 0;
    char c;

    do{
        inFile->get(c);

        if(c == '/' && ( inFile->peek() == '/' || inFile->peek() == '*') && !multiLineComment && !singleLineComment){
            if(inFile->peek() == '/'){
                singleLineComment = true;
            }
            else if(inFile->peek() == '*'){
                multiLineComment = true;
            }
        }
        else{
            if(multiLineComment){
                if(c == '*' && inFile->peek() == '/'){
                    inFile->get(c);
                    multiLineComment = false;
                }
            }
            else if (singleLineComment){
                if(c == '\n')
                    singleLineComment = false;
            }
            else{
                if(c !=' ' && c != '\n' && c != ';')
                    ++stringLen;
                else if(c == ';' && stringLen){
                    ++loc;
                    stringLen = 0;
                }
            }

        }


    }while(!inFile->eof());

    return loc;
}