From 87bea61d23fa68485b5f67592fb12e449d0bf07c Mon Sep 17 00:00:00 2001 From: mlsulekhiya <44512130+mlsulekhiya@users.noreply.github.com> Date: Sat, 12 Oct 2019 22:45:25 +0530 Subject: [PATCH] initialized variables. --- Chapter 3/3.3.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Chapter 3/3.3.cpp b/Chapter 3/3.3.cpp index 9a5fe54..318a038 100644 --- a/Chapter 3/3.3.cpp +++ b/Chapter 3/3.3.cpp @@ -4,10 +4,10 @@ using namespace std; class SetOfStacks{ - int capacity; //max capacity after which new stack is formed - int maxCols; - int topCol; //the column of the stack - int topRow; + int capacity=0; //max capacity after which new stack is formed + int maxCols=0; + int topCol=0; //the column of the stack + int topRow=0; int **data; public: SetOfStacks(int, int); @@ -69,4 +69,5 @@ int SetOfStacks :: top(){ int main(){ cout << "Stack Implemented\n"; + return 0; }