Here's par of my code:
Right now 4 functions dont take any arguments. If I put in variables then build the solution it gives me a warning stating that my variables are unintialized local variables. What does that mean?Code:bool Opener(char ch){ if((ch == '(') || (ch =='[') || (ch =='{')) return true; else return false; }/*end of opener*/ bool Closer(char ch){ if((ch == ')') || (ch == ']') || (ch == '}')) return true; else return false; }/*end of closer*/ int main(){ Astack S; string s; unsigned int i; cout <<"Enter data:\n"; getline(cin, s); for(i = 0; i < s.length(); i++){ if(Opener()) S.push(); } for(i = 0; i < s.length(); i++){ if(Closer()) S.pop(); if(S.IsEmpty()) cout << "No Openers found"; } return 0; }



LinkBack URL
About LinkBacks


