
-----------------------------------
Panphobia
Sat Dec 08, 2012 8:50 pm

Stuck on a problem, Quick fix
-----------------------------------
I have been learning c++ and I have been looking over the old dwite questions and solving them in c++ for practise and such, I have a current question im finishing from the new round 2 dwite http://dwite.org/questions/magic_trick.html , i know how to solve it, just a little compiling error, if someone could point me in the right direction that would be nice[code]#include 
#include 
#include 
#include 
#include 
using namespace std;
int main()
{
     ifstream fin ("/home/daniel/DATA4.txt");
     for(int x = 0; x < 5; ++x)
     {
      int n;
      fin >> n;
	  set cards;
	   int cardsLeft[n];
	for(int i = 0; i < n;++i)
	{
		int temp;
		fin >> temp;
		cardsLeft[i] = temp;
		cards.insert(i+1);
	}
	string phrase = "";
	for(int i = 0; i < n;++i)
	{
	    if(cards.size() - 1 - cardsLeft[i] < 0)
	    {
			cout > n;
	  vector  cards;
	   int cardsLeft[n];
	for(int i = 0; i < n;++i)
	{
		int temp;
		fin >> temp;
		cardsLeft[i] = temp;
		cards.push_back(i+1);
	}
	string phrase = "";
	for(int i = 0; i < n;++i)
	{
	    if(cards.size() - 1 - cardsLeft[i] < 0)
	    {
			cout 