help with my turbo c++
#include <iostream>
#include <cassert>//what is the use of this???
#include <algorithm>//how to convert in turbo c++ and what is the use this???
#include <vector>//is this array in turbo c++???
using namespace std;
int main()
{
bool result;// what is the use of this??
string s("abcde");
string s2("aeiou");
vector<char> vector1(s.begin(), s.end());// how to convert this in turbo c++
vector<char> vector2(s2.begin(), s2.end());//how to convert this in turbo c++
vector<char> setDifference;//how t convert this in turbo c++
set_symmetric_difference(vector1.begin(),vector1.end(),vector2.begin(), vector2.end(),back_inserter(setDifference));//how to convert this in turbo c++
for(int i=0;i<setDifference.size();i++){
cout << setDifference[i];
}
return 0;
}
gujinni
Junior Poster in Training
52 posts since Jun 2011
Reputation Points: 10
Solved Threads: 0
Sounds to me like this "Turbo C++" you keep mentioning does not actually support C++. I suggest you get a compiler that supports C++.
Moschops
Practically a Master Poster
620 posts since Sep 2008
Reputation Points: 258
Solved Threads: 117
>#include //what is the use of this???
In that program it's not used. But defines the assert macro, which is used for sanity checks:
void foo(int *p)
{
// Precondition: p is not a null pointer
assert(p != 0);
....
}
Your questions boil down to "How do I convert standard C++ to something that will compile under a pre-standard compiler?". The answer is you don't, it's not worth the effort. Get a newer compiler.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
is vector is an array????
gujinni
Junior Poster in Training
52 posts since Jun 2011
Reputation Points: 10
Solved Threads: 0
No. vector is a C++ container class. It is not the same thing as an array.
Moschops
Practically a Master Poster
620 posts since Sep 2008
Reputation Points: 258
Solved Threads: 117
tnx everyone.., it seems that my problem was solve.. tnx for your time. God Bless
gujinni
Junior Poster in Training
52 posts since Jun 2011
Reputation Points: 10
Solved Threads: 0