Code:#include<iostream> #include<string> using namespace std; typedef vector<string> s1; s1 array; void func(string x); void call(string y); int main() { string str = "abcd"; if(str == "efg") cout<<"hello"<<endl; else { func(str); call(str); cout<<array[0]<<endl; } } void func(string x) { array.push_back(x); } void call(string y) { cout<<"i am here "; }
i am getting compile error in this code.
i want two things >
1. why there is errors.
2. how can i fix those errors.