Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Plain Text by ben ( 14 years ago )
#include "stdafx.h"
#include <sstream>
#include <iostream>
#include <cstdlib>
using namespace std;

const int Width = 2;
const int Height = 2;
char spielfeld[Width][Height];

bool choosePattern(int selection){
  switch(selection)
 {
  case 0:
   char block[2][2] = {{0,0},{0,0}};
   return true;
  
  case 1:
 
  case 2:
 
  case 3:

  case 4:
 
  case 5:

  case 6:

  case 7:
 }
}

//Hauptfunktion wird aufgerufen beim Start
int main(int argc, char* argv[])
{
 int selection;

 cout << "Bitte w‰hlen sie ein Startmuster!" << endl;
 cout << "[0]...Block" << endl;
 cout << "[1]...Boat" << endl;
 cout << "[2]...Blinker" << endl;
 cout << "[3]...Toad" << endl;
 cout << "[4]...Exploder" << endl;
 cout << "[5]...Spaceship" << endl;
 cout << "[6]...10 Cell Row" << endl;
 cout << "[7]...Random" << endl;

 //Einlesen eines String und umwandeln in int
 string input;
 stringstream tmpStream;
 getline(cin, input);
 tmpStream.str(input);
 tmpStream >> selection;
 tmpStream.clear();
 
 
 /**for(int i = 0; i <= Width; i++)
 {
  for(int j = 0; j <= Height; j++)
  {
  cout << block[i][j] << endl;
  }
 }
 **/

 return 0;
}

 

Revise this Paste

Your Name: Code Language: