Hi,
I want to declare a function, which takes input of a set of integers and returns a set of set of integers , I tried this but, it ain't correct , plz tell how I should do what I want

#include<iostream>
#include<set>
#include<string>
using namespace std;

int Q;
int N;

void stateminimise();
set<set> partition(set inp);
int main(){

   cout<<"\n Enter the number of states \n";
   cin >> Q;
   cout<<"\n Enter the number of various alphabets to used for input and output \n";
   cin << N;
   cout<<"\n The input and output lines will be represented as X and Y respectively \n";
   stateminimise();
}

set<set> partition(set inp){

}

Thanks, bye,
arjun

Recommended Answers

All 6 Replies

I think you need to specialize your inner sets.

set<set<int> > partition(set<int> inp);

I think you need to specialize your inner sets.

set<set<int> > partition(set<int> inp);

Thank you,

Actually whatever C++ I've learnt has been through doing assignments, and that is why I have such weard syntax

Hi,
can I declare an array whose index starts not from zero, but from some other integer.
Just wanted to know!

arjun

>but why?
Have you ever tried to convert a complex algorithm written in Pascal to C? ;)

>but why?
Have you ever tried to convert a complex algorithm written in Pascal to C? ;)

Color me fortunate.

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.