#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;
}

Sounds to me like this "Turbo C++" you keep mentioning does not actually support C++. I suggest you get a compiler that supports C++.

>#include <cassert>//what is the use of this???
In that program it's not used. But <cassert> 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.

commented: +1 +17

is vector is an array????

No. vector is a C++ container class. It is not the same thing as an array.

how to convert this in turbo c++

Don't bother. You should download a new compiler/IDE. There are plenty of threads on this forum discussing which ones are good. If I were you, I'd go and look at some of them and then you won't have these problems.

To get you started you could try either code::blocks, Eclipse or Qt Creator. I also quite like CodeLite, but I don't know how big its user base is. If you're working on a MS Windows-based computer and you're only ever going to make programs that you want to run on Windows, then you could try Microsoft's Visual Studio Express.

Once you have a more-or-less standards-compliant compiler, you will be able to get going with using all the STL features that you're currently missing out on!

To answer another question that you had

#include <vector>//is this array in turbo c++???

A vector is a bit like an array, but much more powerful. vector manages its own memory and grows and shrinks as you add and remove things from it. You can read all about the various features of vector here.

Have fun.

commented: Nice +17

tnx everyone.., it seems that my problem was solve.. tnx for your time. God Bless

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.