<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Express-Hilfe benötigt]]></title><description><![CDATA[<p>Moinmoin</p>
<p>Da ich jetzt auch noch von meinem Betreuer gezwungen wurde für meine Maturarbeit so schnell mal ein bisschen C++ zu schreiben, was ich absolut nicht kann bitte ich euch um Hilfe.</p>
<p>Wer könnte mir diesen Code:</p>
<pre><code>#include &quot;stdafx.h&quot;
#include &quot;resource.h&quot;

#define MAX_LOADSTRING 100

#define	ROWS			50
#define	COLS			50
#define	ROW_SIZE		10
#define	COL_SIZE		10
#define	CLIP_SIZE	50
#define	OTHER_SIZE	150

#define	TABLE_WIDTH		(ROWS*ROW_SIZE)
#define	TABLE_HEIGHT	(COLS*COL_SIZE)
#define	TABLE_X			(CLIP_SIZE)
#define	TABLE_Y			(CLIP_SIZE)
#define	WINDOW_WIDTH	(CLIP_SIZE + TABLE_WIDTH + OTHER_SIZE + CLIP_SIZE)
#define	WINDOW_HEIGHT	(CLIP_SIZE + TABLE_HEIGHT + CLIP_SIZE)

HANDLE	hBitBuffer, hBitBack, hBitAlive, hBitDead;

HANDLE	hBitButClear, hBitButNext, hBitButStart[2], hBitButStop,
			hBitButSlow[2], hBitButNormal[2], hBitButFast[2],
			hBitButClose;

HMENU		menu;

unsigned char	table[ROWS][COLS], dtable[ROWS][COLS];

#define	CAP_MOVE		1
#define	CAP_TABLE	2
int		captured = 0, cap_button;
POINT		cap_point, table_point;

#define	TD_SLOW		1000
#define	TD_NORMAL	400
#define	TD_FAST		100

unsigned int	timer_delay = TD_NORMAL;
bool				timer_working = FALSE;

HWND		hWndButtonClear,
			hWndButtonNext,
			hWndButtonStart,
			hWndButtonStop,
			hWndButtonSlow,
			hWndButtonNormal,
			hWndButtonFast,
			hWndButtonClose;

// Global Variables:
HINSTANCE hInst;								// current instance
TCHAR szTitle[MAX_LOADSTRING];								// The title bar text
TCHAR szWindowClass[MAX_LOADSTRING];								// The title bar text

// Foward declarations of functions included in this code module:
ATOM				MyRegisterClass(HINSTANCE hInstance);
BOOL				InitInstance(HINSTANCE, int);
LRESULT CALLBACK	WndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK	About(HWND, UINT, WPARAM, LPARAM);

/*****************************************************************************/
void	table_clear(void)
{
	int	x, y;

	for(y=0; y&lt;ROWS; y++)
		for(x=0; x&lt;COLS; x++)
			table[y][x] = 0;
}

void	table_set(int row, int col, unsigned char val)
{
	table[row][col] = val;
}

int	table_neighbors(int y, int x)
{
	int	n=0;

	if (table[y-1][x-1])
		n++;
	if (table[y-1][x])
		n++;
	if (table[y-1][x+1])
		n++;

	if (table[y][x-1])
		n++;
	if (table[y][x+1])
		n++;

	if (table[y+1][x-1])
		n++;
	if (table[y+1][x])
		n++;
	if (table[y+1][x+1])
		n++;

	return(n);
}

void	table_next(void)
{
	int	x, y, n;

	for(y=1; y&lt;ROWS-1; y++)
	{
		for(x=1; x&lt;COLS-1; x++)
		{
			n = table_neighbors(y, x);
			if (table[y][x])
			{
				if (n == 2 || n == 3)
					dtable[y][x] = 0;
				else
					dtable[y][x] = 1;
			}
			else
			{
				if (n == 3)
					dtable[y][x] = 1;
				else
					dtable[y][x] = 0;
			}
		}
	}

	for(y=0; y&lt;ROWS; y++)
		for(x=0; x&lt;COLS; x++)
			table[y][x] = dtable[y][x];
}

/*****************************************************************************/
int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
 	// TODO: Place code here.
	MSG msg;
	HACCEL hAccelTable;

	// Initialize global strings
	LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
	LoadString(hInstance, IDC_LIFE, szWindowClass, MAX_LOADSTRING);
	MyRegisterClass(hInstance);

	hBitAlive = LoadImage(hInstance, MAKEINTRESOURCE(IDB_ALIVE), IMAGE_BITMAP, 0, 0, 0);
	if (!hBitAlive)
		return FALSE;
	hBitDead = LoadImage(hInstance, MAKEINTRESOURCE(IDB_DEAD), IMAGE_BITMAP, 0, 0, 0);
	if (!hBitDead)
		return FALSE;
	hBitDead = LoadImage(hInstance, MAKEINTRESOURCE(IDB_SICK), IMAGE_BITMAP, 0, 0, 0);
	if (!hBitSick)
		return FALSE;
	hBitDead = LoadImage(hInstance, MAKEINTRESOURCE(IDB_INFECTED), IMAGE_BITMAP, 0, 0, 0);
	if (!hBitInfected)
		return FALSE;
	hBitDead = LoadImage(hInstance, MAKEINTRESOURCE(IDB_INFECTIOUS), IMAGE_BITMAP, 0, 0, 0);
	if (!hBitInfectious)
		return FALSE;
	hBitDead = LoadImage(hInstance, MAKEINTRESOURCE(IDB_IMMUNE), IMAGE_BITMAP, 0, 0, 0);
	if (!hBitImmune)
		return FALSE;

	// Perform application initialization:
	if (!InitInstance (hInstance, nCmdShow)) 
		return FALSE;

	table_clear();

	hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_LIFE);

	// Main message loop:
	while (GetMessage(&amp;msg, NULL, 0, 0)) 
	{
		if (!TranslateAccelerator(msg.hwnd, hAccelTable, &amp;msg)) 
		{
			TranslateMessage(&amp;msg);
			DispatchMessage(&amp;msg);
		}
	}

	return msg.wParam;
}

//
//  FUNCTION: MyRegisterClass()
//
//  PURPOSE: Registers the window class.
//
//  COMMENTS:
//
//    This function and its usage is only necessary if you want this code
//    to be compatible with Win32 systems prior to the 'RegisterClassEx'
//    function that was added to Windows 95. It is important to call this function
//    so that the application will get 'well formed' small icons associated
//    with it.
//
ATOM MyRegisterClass(HINSTANCE hInstance)
{
	WNDCLASSEX wcex;

	wcex.cbSize = sizeof(WNDCLASSEX); 

	wcex.style			= CS_HREDRAW | CS_VREDRAW;
	wcex.lpfnWndProc	= (WNDPROC)WndProc;
	wcex.cbClsExtra		= 0;
	wcex.cbWndExtra		= 0;
	wcex.hInstance		= hInstance;
	wcex.hIcon			= LoadIcon(hInstance, (LPCTSTR)IDI_LIFE);
	wcex.hCursor		= LoadCursor(NULL, IDC_ARROW);
	wcex.hbrBackground	= (HBRUSH)(COLOR_WINDOW+1);
	wcex.lpszMenuName	= NULL;//(LPCSTR)IDC_LIFE;
	wcex.lpszClassName	= szWindowClass;
	wcex.hIconSm		= LoadIcon(wcex.hInstance, (LPCTSTR)IDI_LIFE);

	return RegisterClassEx(&amp;wcex);
}

//
//   FUNCTION: InitInstance(HANDLE, int)
//
//   PURPOSE: Saves instance handle and creates main window
//
//   COMMENTS:
//
//        In this function, we save the instance handle in a global variable and
//        create and display the main program window.
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
   HWND	hWnd;
	RECT	rect;
	DWORD	style;
	HRGN	region;

   hInst = hInstance; // Store instance handle in our global variable

	rect.left = 100;										//x
	rect.top = 100;										//y
	rect.right = rect.left + WINDOW_WIDTH;			//width
	rect.bottom = rect.top + WINDOW_HEIGHT;		//height

	style = WS_CLIPSIBLINGS | WS_OVERLAPPED | WS_SYSMENU | 
		WS_MINIMIZEBOX | WS_CLIPCHILDREN;

	if (!AdjustWindowRect(&amp;rect, style, false))
		return FALSE;

	region = CreateRectRgn(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
	if (!region)
		return FALSE;

	hWnd = CreateWindow(szWindowClass, szTitle, style,
      rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top,
		NULL, NULL, hInstance, NULL);
   if (!hWnd)
      return FALSE;

	if (!SetWindowRgn(hWnd, region, FALSE))
		return FALSE;

	menu = LoadMenu(hInstance, MAKEINTRESOURCE(IDR_MENU_CLPOPUP));
	if (!menu)
		return FALSE;

	int	x, y;

	x = TABLE_X + TABLE_WIDTH + 30;
	y = TABLE_Y;

	hWndButtonClear = CreateWindow(&quot;Button&quot;,&quot;Clear&quot;,
		WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON | BS_BITMAP, 
		x, y, 120, 40, hWnd, NULL, hInstance, NULL);
	y+=40;

	hWndButtonNext = CreateWindow(&quot;Button&quot;, &quot;Next&quot;,
		WS_VISIBLE | WS_CHILD | BS_BITMAP, 
		x, y, 120, 40, hWnd, NULL, hInstance, NULL);
	y+=50;

	hWndButtonStart = CreateWindow(&quot;Button&quot;, &quot;Start&quot;,
		WS_VISIBLE | WS_CHILD | BS_BITMAP, 
		x, y, 120, 40, hWnd, NULL, hInstance, NULL);
	y+=40;

	hWndButtonStop = CreateWindow(&quot;Button&quot;, &quot;Stop&quot;,
		WS_VISIBLE | WS_CHILD | BS_BITMAP, 
		x, y, 120, 40, hWnd, NULL, hInstance, NULL);
	y+=50;

	hWndButtonSlow = CreateWindow(&quot;Button&quot;, &quot;Slow&quot;,
		WS_VISIBLE | WS_CHILD | BS_BITMAP, 
		x, y, 120, 40, hWnd, NULL, hInstance, NULL);
	y+=40;

	hWndButtonNormal = CreateWindow(&quot;Button&quot;, &quot;Normal&quot;,
		WS_VISIBLE | WS_CHILD | BS_BITMAP, 
		x, y, 120, 40, hWnd, NULL, hInstance, NULL);
	y+=40;

	hWndButtonFast = CreateWindow(&quot;Button&quot;, &quot;Fast&quot;,
		WS_VISIBLE | WS_CHILD | BS_BITMAP, 
		x, y, 120, 40, hWnd, NULL, hInstance, NULL);
	y+=40;

	hBitButClear = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTCLEAR));
	SendMessage(hWndButtonClear, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
		(LPARAM)(HANDLE)hBitButClear);

	hBitButNext = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTNEXT));
	SendMessage(hWndButtonNext, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
		(LPARAM)(HANDLE)hBitButNext);

	hBitButStart[0] = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTSTART));
	hBitButStart[1] = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTSTART_ON));
	SendMessage(hWndButtonStart, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
		(LPARAM)(HANDLE)hBitButStart[0]);

	hBitButStop = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTSTOP));
	SendMessage(hWndButtonStop, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
		(LPARAM)(HANDLE)hBitButStop);

	hBitButSlow[0] = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTSLOW));
	hBitButSlow[1] = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTSLOW_ON));
	SendMessage(hWndButtonSlow, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
		(LPARAM)(HANDLE)hBitButSlow[0]);

	hBitButNormal[0] = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTNORMAL));
	hBitButNormal[1] = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTNORMAL_ON));
	SendMessage(hWndButtonNormal, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
		(LPARAM)(HANDLE)hBitButNormal[1]);

	hBitButFast[0] = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTFAST));
	hBitButFast[1] = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTFAST_ON));
	SendMessage(hWndButtonFast, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
		(LPARAM)(HANDLE)hBitButFast[0]);

	   ShowWindow(hWnd, nCmdShow);
   UpdateWindow(hWnd);

   return TRUE;
}

//
//  FUNCTION: WndProc(HWND, unsigned, WORD, LONG)
//
//  PURPOSE:  Processes messages for the main window.
//
//  WM_COMMAND	- process the application menu
//  WM_PAINT	- Paint the main window
//  WM_DESTROY	- post a quit message and return
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	//int	wmId, wmEvent;
	int			x, y;
	POINT			point;
	int			id = LOWORD(wParam);
	HWND			handle = (HWND)lParam;
	PAINTSTRUCT	ps;
	HDC			hdc;
	TCHAR			szHello[MAX_LOADSTRING];

	LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING);

	switch (message) 
	{
		case WM_TIMER:
			if (wParam == 1)
			{
				table_next();
				InvalidateRect(hWnd, NULL, FALSE);
			}

			break;

		case WM_COMMAND:

			switch(HIWORD(wParam))
			{
				case	BN_CLICKED:
					if (handle == hWndButtonClear)
					{
						table_clear();
						InvalidateRect(hWnd, NULL, FALSE);
					}
					else if (handle == hWndButtonNext)
					{
						table_next();
						InvalidateRect(hWnd, NULL, FALSE);
					}
					else if (handle == hWndButtonStart)
					{
						SetTimer(hWnd, 1, timer_delay, NULL);
						timer_working = TRUE;
						SendMessage(hWndButtonStart, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButStart[1]);
					}
					else if (handle == hWndButtonStop)
					{
						if (timer_working)
							KillTimer(hWnd, 1);
						timer_working = FALSE;
						SendMessage(hWndButtonStart, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButStart[0]);
					}
					else if (handle == hWndButtonSlow)
					{
						timer_delay = TD_SLOW;
						if (timer_working)
							SetTimer(hWnd, 1, timer_delay, NULL);
						SendMessage(hWndButtonSlow, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButSlow[1]);
						SendMessage(hWndButtonNormal, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButNormal[0]);
						SendMessage(hWndButtonFast, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButFast[0]);
					}
					else if (handle == hWndButtonNormal)
					{
						timer_delay = TD_NORMAL;
						if (timer_working)
							SetTimer(hWnd, 1, timer_delay, NULL);
						SendMessage(hWndButtonSlow, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButSlow[0]);
						SendMessage(hWndButtonNormal, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButNormal[1]);
						SendMessage(hWndButtonFast, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButFast[0]);
					}
					else if (handle == hWndButtonFast)
					{
						timer_delay = TD_FAST;
						if (timer_working)
							SetTimer(hWnd, 1, timer_delay, NULL);
						SendMessage(hWndButtonSlow, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButSlow[0]);
						SendMessage(hWndButtonNormal, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButNormal[0]);
						SendMessage(hWndButtonFast, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButFast[1]);
					}
					else if (handle == hWndButtonClose)
					{
						DestroyWindow(hWnd);
					}

					break;
			}

			switch (LOWORD(wParam))
			{
				case	IDM_CL_CLOSE:
					DestroyWindow(hWnd);
					break;
				case	IDM_CL_MINIMIZE:
					break;
			}
			break;

		case WM_PAINT:
			HDC		hdc_buf, hdc_temp;
			HGDIOBJ	temp;

			hdc = BeginPaint(hWnd, &amp;ps);

			// Run once
			if (!hBitBuffer)
				hBitBuffer = CreateCompatibleBitmap(hdc, WINDOW_WIDTH, WINDOW_HEIGHT);

			// Double-Buffer DC
			hdc_buf = CreateCompatibleDC(hdc);
			SelectObject(hdc_buf, hBitBuffer);

			// Background DC
			hdc_temp = CreateCompatibleDC(hdc_buf);
			temp = SelectObject(hdc_temp, hBitBack);

			// Copy background onto back-buffer
			BitBlt(hdc_buf, 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT, hdc_temp, 0, 0, SRCCOPY);
			SelectObject(hdc_temp, temp);

			// Copy table
			for(y=0; y&lt;ROWS; y++)
			{
				for(x=0; x&lt;COLS; x++)
				{
					temp = SelectObject(hdc_temp, (table[y][x])?hBitAlive:hBitDead:hBitSick:hBitInfected:hBitInfectious:hBitImmune);
					BitBlt(hdc_buf, TABLE_X + x*COL_SIZE, TABLE_Y + y*ROW_SIZE, COL_SIZE, ROW_SIZE,
						hdc_temp, 0, 0, SRCCOPY);
					SelectObject(hdc_temp, temp);
				}
			}

			DeleteDC(hdc_temp);

			BitBlt(hdc, 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT, hdc_buf, 0, 0, SRCCOPY);

			DeleteDC(hdc_buf);

			EndPaint(hWnd, &amp;ps);
			break;

		case WM_ERASEBKGND:
			break;

		case WM_DESTROY:
			PostQuitMessage(0);
			break;

		case	WM_LBUTTONDOWN:
			x = (LOWORD(lParam) - TABLE_X);
			y = (HIWORD(lParam) - TABLE_Y);

			if ((x&gt;=0) &amp;&amp; (y&gt;=0) &amp;&amp; (x&lt;COLS*COL_SIZE) &amp;&amp; (y&lt;ROWS*ROW_SIZE))
			{
				captured = CAP_TABLE;
				cap_button = 1;
				SetCapture(hWnd);
				SetCursor(LoadCursor(NULL, IDC_CROSS));

				x /= COL_SIZE;
				y /= ROW_SIZE;
				table_set(y, x, 1);
				table_point.x = x;
				table_point.y = y;

				InvalidateRect(hWnd, NULL, FALSE);
			}
			else
			{
				captured = CAP_MOVE;
				SetCapture(hWnd);
				cap_point.x = LOWORD(lParam);
				cap_point.y = HIWORD(lParam);
				SetCursor(LoadCursor(NULL, IDC_SIZEALL));
			}
			break;

		case	WM_RBUTTONDOWN:
			x = (LOWORD(lParam) - TABLE_X);
			y = (HIWORD(lParam) - TABLE_Y);

			if ((x&gt;=0) &amp;&amp; (y&gt;=0) &amp;&amp; (x&lt;COLS*COL_SIZE) &amp;&amp; (y&lt;ROWS*ROW_SIZE))
			{
				captured = CAP_TABLE;
				cap_button = 2;
				SetCapture(hWnd);
				SetCursor(LoadCursor(NULL, IDC_CROSS));

				x /= COL_SIZE;
				y /= ROW_SIZE;
				table_set(y, x, 0);
				table_point.x = x;
				table_point.y = y;

				InvalidateRect(hWnd, NULL, FALSE);
			}
			break;

		case	WM_MOUSEMOVE:
			if (captured == CAP_MOVE)
			{
				point.x = LOWORD(lParam);
				point.y = HIWORD(lParam);

				ClientToScreen(hWnd, &amp;point);

				point.x -= cap_point.x;
				point.y -= cap_point.y;

				SetWindowPos(hWnd, NULL, point.x, point.y, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
			}
			else if (captured == CAP_TABLE)
			{
				x = (LOWORD(lParam) - TABLE_X);
				y = (HIWORD(lParam) - TABLE_Y);

				if ((x&gt;=0) &amp;&amp; (y&gt;=0) &amp;&amp; (x&lt;COLS*COL_SIZE) &amp;&amp; (y&lt;ROWS*ROW_SIZE))
				{
					x /= COL_SIZE;
					y /= ROW_SIZE;
					if (x != table_point.x || y != table_point.y)
					{
						table_point.x = x;
						table_point.y = y;
						table_set(y, x, (cap_button==1)?1:0);

						InvalidateRect(hWnd, NULL, FALSE);
					}
				}
			}
			break;

		case	WM_LBUTTONUP:

			if (captured == CAP_MOVE)
			{
				captured = 0;
				ReleaseCapture();
				SetCursor(LoadCursor(NULL, IDC_ARROW));
			}
			else if (captured == CAP_TABLE)
			{
				captured = 0;
				ReleaseCapture();
			}
			break;

		case	WM_RBUTTONUP:

			if (captured == CAP_TABLE)
			{
				if (cap_button == 2)
				{
					captured = 0;
					ReleaseCapture();
				}
			}
		default:
			return DefWindowProc(hWnd, message, wParam, lParam);
   }
   return 0;
}

// Mesage handler for about box.
LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
	switch (message)
	{
		case WM_INITDIALOG:
				return TRUE;

		case WM_COMMAND:
			if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) 
			{
				EndDialog(hDlg, LOWORD(wParam));
				return TRUE;
			}
			break;
	}
    return FALSE;
}
</code></pre>
<p>so ändern, dass alle Zustände (Alive, Dead, Sick, Infected, Infectious, Immune) dargestellt werden können und nicht wie bisher nur Dead oder Alive.</p>
<p>Der Zustand hängt immer vom vorherigen ab:</p>
<p>Alive wird bei genügend Kontakt mit infizierten Nachbarn auch infiziert und damit INFEcted und Infectious.Dann entscheidet eine Wahrscheinlichkeit darüber, ob der Agent erkrankt und Sick und Infectious oder Immune und nicht mehr Infectious wird. Falls er Sick wurde, entscheidet noch die Wahrscheinlichkeit darüber , ob die Person Dead oder Immune wird.</p>
<p>Ich hoffe ich habe mich klar ausgedrückt.</p>
<p>Ich wäre euch sehr sehr dankbar für schnelle Hilfe, da ich sonst ein ernsthaftes Problem habe.</p>
<p>MfG<br />
Florian Eichenberger</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/160657/express-hilfe-benötigt</link><generator>RSS for Node</generator><lastBuildDate>Fri, 11 Sep 2026 08:35:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/160657.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 28 Sep 2006 09:16:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 09:16:26 GMT]]></title><description><![CDATA[<p>Moinmoin</p>
<p>Da ich jetzt auch noch von meinem Betreuer gezwungen wurde für meine Maturarbeit so schnell mal ein bisschen C++ zu schreiben, was ich absolut nicht kann bitte ich euch um Hilfe.</p>
<p>Wer könnte mir diesen Code:</p>
<pre><code>#include &quot;stdafx.h&quot;
#include &quot;resource.h&quot;

#define MAX_LOADSTRING 100

#define	ROWS			50
#define	COLS			50
#define	ROW_SIZE		10
#define	COL_SIZE		10
#define	CLIP_SIZE	50
#define	OTHER_SIZE	150

#define	TABLE_WIDTH		(ROWS*ROW_SIZE)
#define	TABLE_HEIGHT	(COLS*COL_SIZE)
#define	TABLE_X			(CLIP_SIZE)
#define	TABLE_Y			(CLIP_SIZE)
#define	WINDOW_WIDTH	(CLIP_SIZE + TABLE_WIDTH + OTHER_SIZE + CLIP_SIZE)
#define	WINDOW_HEIGHT	(CLIP_SIZE + TABLE_HEIGHT + CLIP_SIZE)

HANDLE	hBitBuffer, hBitBack, hBitAlive, hBitDead;

HANDLE	hBitButClear, hBitButNext, hBitButStart[2], hBitButStop,
			hBitButSlow[2], hBitButNormal[2], hBitButFast[2],
			hBitButClose;

HMENU		menu;

unsigned char	table[ROWS][COLS], dtable[ROWS][COLS];

#define	CAP_MOVE		1
#define	CAP_TABLE	2
int		captured = 0, cap_button;
POINT		cap_point, table_point;

#define	TD_SLOW		1000
#define	TD_NORMAL	400
#define	TD_FAST		100

unsigned int	timer_delay = TD_NORMAL;
bool				timer_working = FALSE;

HWND		hWndButtonClear,
			hWndButtonNext,
			hWndButtonStart,
			hWndButtonStop,
			hWndButtonSlow,
			hWndButtonNormal,
			hWndButtonFast,
			hWndButtonClose;

// Global Variables:
HINSTANCE hInst;								// current instance
TCHAR szTitle[MAX_LOADSTRING];								// The title bar text
TCHAR szWindowClass[MAX_LOADSTRING];								// The title bar text

// Foward declarations of functions included in this code module:
ATOM				MyRegisterClass(HINSTANCE hInstance);
BOOL				InitInstance(HINSTANCE, int);
LRESULT CALLBACK	WndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK	About(HWND, UINT, WPARAM, LPARAM);

/*****************************************************************************/
void	table_clear(void)
{
	int	x, y;

	for(y=0; y&lt;ROWS; y++)
		for(x=0; x&lt;COLS; x++)
			table[y][x] = 0;
}

void	table_set(int row, int col, unsigned char val)
{
	table[row][col] = val;
}

int	table_neighbors(int y, int x)
{
	int	n=0;

	if (table[y-1][x-1])
		n++;
	if (table[y-1][x])
		n++;
	if (table[y-1][x+1])
		n++;

	if (table[y][x-1])
		n++;
	if (table[y][x+1])
		n++;

	if (table[y+1][x-1])
		n++;
	if (table[y+1][x])
		n++;
	if (table[y+1][x+1])
		n++;

	return(n);
}

void	table_next(void)
{
	int	x, y, n;

	for(y=1; y&lt;ROWS-1; y++)
	{
		for(x=1; x&lt;COLS-1; x++)
		{
			n = table_neighbors(y, x);
			if (table[y][x])
			{
				if (n == 2 || n == 3)
					dtable[y][x] = 0;
				else
					dtable[y][x] = 1;
			}
			else
			{
				if (n == 3)
					dtable[y][x] = 1;
				else
					dtable[y][x] = 0;
			}
		}
	}

	for(y=0; y&lt;ROWS; y++)
		for(x=0; x&lt;COLS; x++)
			table[y][x] = dtable[y][x];
}

/*****************************************************************************/
int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
 	// TODO: Place code here.
	MSG msg;
	HACCEL hAccelTable;

	// Initialize global strings
	LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
	LoadString(hInstance, IDC_LIFE, szWindowClass, MAX_LOADSTRING);
	MyRegisterClass(hInstance);

	hBitAlive = LoadImage(hInstance, MAKEINTRESOURCE(IDB_ALIVE), IMAGE_BITMAP, 0, 0, 0);
	if (!hBitAlive)
		return FALSE;
	hBitDead = LoadImage(hInstance, MAKEINTRESOURCE(IDB_DEAD), IMAGE_BITMAP, 0, 0, 0);
	if (!hBitDead)
		return FALSE;
	hBitDead = LoadImage(hInstance, MAKEINTRESOURCE(IDB_SICK), IMAGE_BITMAP, 0, 0, 0);
	if (!hBitSick)
		return FALSE;
	hBitDead = LoadImage(hInstance, MAKEINTRESOURCE(IDB_INFECTED), IMAGE_BITMAP, 0, 0, 0);
	if (!hBitInfected)
		return FALSE;
	hBitDead = LoadImage(hInstance, MAKEINTRESOURCE(IDB_INFECTIOUS), IMAGE_BITMAP, 0, 0, 0);
	if (!hBitInfectious)
		return FALSE;
	hBitDead = LoadImage(hInstance, MAKEINTRESOURCE(IDB_IMMUNE), IMAGE_BITMAP, 0, 0, 0);
	if (!hBitImmune)
		return FALSE;

	// Perform application initialization:
	if (!InitInstance (hInstance, nCmdShow)) 
		return FALSE;

	table_clear();

	hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_LIFE);

	// Main message loop:
	while (GetMessage(&amp;msg, NULL, 0, 0)) 
	{
		if (!TranslateAccelerator(msg.hwnd, hAccelTable, &amp;msg)) 
		{
			TranslateMessage(&amp;msg);
			DispatchMessage(&amp;msg);
		}
	}

	return msg.wParam;
}

//
//  FUNCTION: MyRegisterClass()
//
//  PURPOSE: Registers the window class.
//
//  COMMENTS:
//
//    This function and its usage is only necessary if you want this code
//    to be compatible with Win32 systems prior to the 'RegisterClassEx'
//    function that was added to Windows 95. It is important to call this function
//    so that the application will get 'well formed' small icons associated
//    with it.
//
ATOM MyRegisterClass(HINSTANCE hInstance)
{
	WNDCLASSEX wcex;

	wcex.cbSize = sizeof(WNDCLASSEX); 

	wcex.style			= CS_HREDRAW | CS_VREDRAW;
	wcex.lpfnWndProc	= (WNDPROC)WndProc;
	wcex.cbClsExtra		= 0;
	wcex.cbWndExtra		= 0;
	wcex.hInstance		= hInstance;
	wcex.hIcon			= LoadIcon(hInstance, (LPCTSTR)IDI_LIFE);
	wcex.hCursor		= LoadCursor(NULL, IDC_ARROW);
	wcex.hbrBackground	= (HBRUSH)(COLOR_WINDOW+1);
	wcex.lpszMenuName	= NULL;//(LPCSTR)IDC_LIFE;
	wcex.lpszClassName	= szWindowClass;
	wcex.hIconSm		= LoadIcon(wcex.hInstance, (LPCTSTR)IDI_LIFE);

	return RegisterClassEx(&amp;wcex);
}

//
//   FUNCTION: InitInstance(HANDLE, int)
//
//   PURPOSE: Saves instance handle and creates main window
//
//   COMMENTS:
//
//        In this function, we save the instance handle in a global variable and
//        create and display the main program window.
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
   HWND	hWnd;
	RECT	rect;
	DWORD	style;
	HRGN	region;

   hInst = hInstance; // Store instance handle in our global variable

	rect.left = 100;										//x
	rect.top = 100;										//y
	rect.right = rect.left + WINDOW_WIDTH;			//width
	rect.bottom = rect.top + WINDOW_HEIGHT;		//height

	style = WS_CLIPSIBLINGS | WS_OVERLAPPED | WS_SYSMENU | 
		WS_MINIMIZEBOX | WS_CLIPCHILDREN;

	if (!AdjustWindowRect(&amp;rect, style, false))
		return FALSE;

	region = CreateRectRgn(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
	if (!region)
		return FALSE;

	hWnd = CreateWindow(szWindowClass, szTitle, style,
      rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top,
		NULL, NULL, hInstance, NULL);
   if (!hWnd)
      return FALSE;

	if (!SetWindowRgn(hWnd, region, FALSE))
		return FALSE;

	menu = LoadMenu(hInstance, MAKEINTRESOURCE(IDR_MENU_CLPOPUP));
	if (!menu)
		return FALSE;

	int	x, y;

	x = TABLE_X + TABLE_WIDTH + 30;
	y = TABLE_Y;

	hWndButtonClear = CreateWindow(&quot;Button&quot;,&quot;Clear&quot;,
		WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON | BS_BITMAP, 
		x, y, 120, 40, hWnd, NULL, hInstance, NULL);
	y+=40;

	hWndButtonNext = CreateWindow(&quot;Button&quot;, &quot;Next&quot;,
		WS_VISIBLE | WS_CHILD | BS_BITMAP, 
		x, y, 120, 40, hWnd, NULL, hInstance, NULL);
	y+=50;

	hWndButtonStart = CreateWindow(&quot;Button&quot;, &quot;Start&quot;,
		WS_VISIBLE | WS_CHILD | BS_BITMAP, 
		x, y, 120, 40, hWnd, NULL, hInstance, NULL);
	y+=40;

	hWndButtonStop = CreateWindow(&quot;Button&quot;, &quot;Stop&quot;,
		WS_VISIBLE | WS_CHILD | BS_BITMAP, 
		x, y, 120, 40, hWnd, NULL, hInstance, NULL);
	y+=50;

	hWndButtonSlow = CreateWindow(&quot;Button&quot;, &quot;Slow&quot;,
		WS_VISIBLE | WS_CHILD | BS_BITMAP, 
		x, y, 120, 40, hWnd, NULL, hInstance, NULL);
	y+=40;

	hWndButtonNormal = CreateWindow(&quot;Button&quot;, &quot;Normal&quot;,
		WS_VISIBLE | WS_CHILD | BS_BITMAP, 
		x, y, 120, 40, hWnd, NULL, hInstance, NULL);
	y+=40;

	hWndButtonFast = CreateWindow(&quot;Button&quot;, &quot;Fast&quot;,
		WS_VISIBLE | WS_CHILD | BS_BITMAP, 
		x, y, 120, 40, hWnd, NULL, hInstance, NULL);
	y+=40;

	hBitButClear = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTCLEAR));
	SendMessage(hWndButtonClear, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
		(LPARAM)(HANDLE)hBitButClear);

	hBitButNext = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTNEXT));
	SendMessage(hWndButtonNext, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
		(LPARAM)(HANDLE)hBitButNext);

	hBitButStart[0] = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTSTART));
	hBitButStart[1] = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTSTART_ON));
	SendMessage(hWndButtonStart, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
		(LPARAM)(HANDLE)hBitButStart[0]);

	hBitButStop = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTSTOP));
	SendMessage(hWndButtonStop, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
		(LPARAM)(HANDLE)hBitButStop);

	hBitButSlow[0] = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTSLOW));
	hBitButSlow[1] = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTSLOW_ON));
	SendMessage(hWndButtonSlow, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
		(LPARAM)(HANDLE)hBitButSlow[0]);

	hBitButNormal[0] = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTNORMAL));
	hBitButNormal[1] = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTNORMAL_ON));
	SendMessage(hWndButtonNormal, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
		(LPARAM)(HANDLE)hBitButNormal[1]);

	hBitButFast[0] = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTFAST));
	hBitButFast[1] = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_BUTFAST_ON));
	SendMessage(hWndButtonFast, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
		(LPARAM)(HANDLE)hBitButFast[0]);

	   ShowWindow(hWnd, nCmdShow);
   UpdateWindow(hWnd);

   return TRUE;
}

//
//  FUNCTION: WndProc(HWND, unsigned, WORD, LONG)
//
//  PURPOSE:  Processes messages for the main window.
//
//  WM_COMMAND	- process the application menu
//  WM_PAINT	- Paint the main window
//  WM_DESTROY	- post a quit message and return
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	//int	wmId, wmEvent;
	int			x, y;
	POINT			point;
	int			id = LOWORD(wParam);
	HWND			handle = (HWND)lParam;
	PAINTSTRUCT	ps;
	HDC			hdc;
	TCHAR			szHello[MAX_LOADSTRING];

	LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING);

	switch (message) 
	{
		case WM_TIMER:
			if (wParam == 1)
			{
				table_next();
				InvalidateRect(hWnd, NULL, FALSE);
			}

			break;

		case WM_COMMAND:

			switch(HIWORD(wParam))
			{
				case	BN_CLICKED:
					if (handle == hWndButtonClear)
					{
						table_clear();
						InvalidateRect(hWnd, NULL, FALSE);
					}
					else if (handle == hWndButtonNext)
					{
						table_next();
						InvalidateRect(hWnd, NULL, FALSE);
					}
					else if (handle == hWndButtonStart)
					{
						SetTimer(hWnd, 1, timer_delay, NULL);
						timer_working = TRUE;
						SendMessage(hWndButtonStart, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButStart[1]);
					}
					else if (handle == hWndButtonStop)
					{
						if (timer_working)
							KillTimer(hWnd, 1);
						timer_working = FALSE;
						SendMessage(hWndButtonStart, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButStart[0]);
					}
					else if (handle == hWndButtonSlow)
					{
						timer_delay = TD_SLOW;
						if (timer_working)
							SetTimer(hWnd, 1, timer_delay, NULL);
						SendMessage(hWndButtonSlow, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButSlow[1]);
						SendMessage(hWndButtonNormal, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButNormal[0]);
						SendMessage(hWndButtonFast, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButFast[0]);
					}
					else if (handle == hWndButtonNormal)
					{
						timer_delay = TD_NORMAL;
						if (timer_working)
							SetTimer(hWnd, 1, timer_delay, NULL);
						SendMessage(hWndButtonSlow, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButSlow[0]);
						SendMessage(hWndButtonNormal, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButNormal[1]);
						SendMessage(hWndButtonFast, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButFast[0]);
					}
					else if (handle == hWndButtonFast)
					{
						timer_delay = TD_FAST;
						if (timer_working)
							SetTimer(hWnd, 1, timer_delay, NULL);
						SendMessage(hWndButtonSlow, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButSlow[0]);
						SendMessage(hWndButtonNormal, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButNormal[0]);
						SendMessage(hWndButtonFast, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP,
							(LPARAM)(HANDLE)hBitButFast[1]);
					}
					else if (handle == hWndButtonClose)
					{
						DestroyWindow(hWnd);
					}

					break;
			}

			switch (LOWORD(wParam))
			{
				case	IDM_CL_CLOSE:
					DestroyWindow(hWnd);
					break;
				case	IDM_CL_MINIMIZE:
					break;
			}
			break;

		case WM_PAINT:
			HDC		hdc_buf, hdc_temp;
			HGDIOBJ	temp;

			hdc = BeginPaint(hWnd, &amp;ps);

			// Run once
			if (!hBitBuffer)
				hBitBuffer = CreateCompatibleBitmap(hdc, WINDOW_WIDTH, WINDOW_HEIGHT);

			// Double-Buffer DC
			hdc_buf = CreateCompatibleDC(hdc);
			SelectObject(hdc_buf, hBitBuffer);

			// Background DC
			hdc_temp = CreateCompatibleDC(hdc_buf);
			temp = SelectObject(hdc_temp, hBitBack);

			// Copy background onto back-buffer
			BitBlt(hdc_buf, 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT, hdc_temp, 0, 0, SRCCOPY);
			SelectObject(hdc_temp, temp);

			// Copy table
			for(y=0; y&lt;ROWS; y++)
			{
				for(x=0; x&lt;COLS; x++)
				{
					temp = SelectObject(hdc_temp, (table[y][x])?hBitAlive:hBitDead:hBitSick:hBitInfected:hBitInfectious:hBitImmune);
					BitBlt(hdc_buf, TABLE_X + x*COL_SIZE, TABLE_Y + y*ROW_SIZE, COL_SIZE, ROW_SIZE,
						hdc_temp, 0, 0, SRCCOPY);
					SelectObject(hdc_temp, temp);
				}
			}

			DeleteDC(hdc_temp);

			BitBlt(hdc, 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT, hdc_buf, 0, 0, SRCCOPY);

			DeleteDC(hdc_buf);

			EndPaint(hWnd, &amp;ps);
			break;

		case WM_ERASEBKGND:
			break;

		case WM_DESTROY:
			PostQuitMessage(0);
			break;

		case	WM_LBUTTONDOWN:
			x = (LOWORD(lParam) - TABLE_X);
			y = (HIWORD(lParam) - TABLE_Y);

			if ((x&gt;=0) &amp;&amp; (y&gt;=0) &amp;&amp; (x&lt;COLS*COL_SIZE) &amp;&amp; (y&lt;ROWS*ROW_SIZE))
			{
				captured = CAP_TABLE;
				cap_button = 1;
				SetCapture(hWnd);
				SetCursor(LoadCursor(NULL, IDC_CROSS));

				x /= COL_SIZE;
				y /= ROW_SIZE;
				table_set(y, x, 1);
				table_point.x = x;
				table_point.y = y;

				InvalidateRect(hWnd, NULL, FALSE);
			}
			else
			{
				captured = CAP_MOVE;
				SetCapture(hWnd);
				cap_point.x = LOWORD(lParam);
				cap_point.y = HIWORD(lParam);
				SetCursor(LoadCursor(NULL, IDC_SIZEALL));
			}
			break;

		case	WM_RBUTTONDOWN:
			x = (LOWORD(lParam) - TABLE_X);
			y = (HIWORD(lParam) - TABLE_Y);

			if ((x&gt;=0) &amp;&amp; (y&gt;=0) &amp;&amp; (x&lt;COLS*COL_SIZE) &amp;&amp; (y&lt;ROWS*ROW_SIZE))
			{
				captured = CAP_TABLE;
				cap_button = 2;
				SetCapture(hWnd);
				SetCursor(LoadCursor(NULL, IDC_CROSS));

				x /= COL_SIZE;
				y /= ROW_SIZE;
				table_set(y, x, 0);
				table_point.x = x;
				table_point.y = y;

				InvalidateRect(hWnd, NULL, FALSE);
			}
			break;

		case	WM_MOUSEMOVE:
			if (captured == CAP_MOVE)
			{
				point.x = LOWORD(lParam);
				point.y = HIWORD(lParam);

				ClientToScreen(hWnd, &amp;point);

				point.x -= cap_point.x;
				point.y -= cap_point.y;

				SetWindowPos(hWnd, NULL, point.x, point.y, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
			}
			else if (captured == CAP_TABLE)
			{
				x = (LOWORD(lParam) - TABLE_X);
				y = (HIWORD(lParam) - TABLE_Y);

				if ((x&gt;=0) &amp;&amp; (y&gt;=0) &amp;&amp; (x&lt;COLS*COL_SIZE) &amp;&amp; (y&lt;ROWS*ROW_SIZE))
				{
					x /= COL_SIZE;
					y /= ROW_SIZE;
					if (x != table_point.x || y != table_point.y)
					{
						table_point.x = x;
						table_point.y = y;
						table_set(y, x, (cap_button==1)?1:0);

						InvalidateRect(hWnd, NULL, FALSE);
					}
				}
			}
			break;

		case	WM_LBUTTONUP:

			if (captured == CAP_MOVE)
			{
				captured = 0;
				ReleaseCapture();
				SetCursor(LoadCursor(NULL, IDC_ARROW));
			}
			else if (captured == CAP_TABLE)
			{
				captured = 0;
				ReleaseCapture();
			}
			break;

		case	WM_RBUTTONUP:

			if (captured == CAP_TABLE)
			{
				if (cap_button == 2)
				{
					captured = 0;
					ReleaseCapture();
				}
			}
		default:
			return DefWindowProc(hWnd, message, wParam, lParam);
   }
   return 0;
}

// Mesage handler for about box.
LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
	switch (message)
	{
		case WM_INITDIALOG:
				return TRUE;

		case WM_COMMAND:
			if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) 
			{
				EndDialog(hDlg, LOWORD(wParam));
				return TRUE;
			}
			break;
	}
    return FALSE;
}
</code></pre>
<p>so ändern, dass alle Zustände (Alive, Dead, Sick, Infected, Infectious, Immune) dargestellt werden können und nicht wie bisher nur Dead oder Alive.</p>
<p>Der Zustand hängt immer vom vorherigen ab:</p>
<p>Alive wird bei genügend Kontakt mit infizierten Nachbarn auch infiziert und damit INFEcted und Infectious.Dann entscheidet eine Wahrscheinlichkeit darüber, ob der Agent erkrankt und Sick und Infectious oder Immune und nicht mehr Infectious wird. Falls er Sick wurde, entscheidet noch die Wahrscheinlichkeit darüber , ob die Person Dead oder Immune wird.</p>
<p>Ich hoffe ich habe mich klar ausgedrückt.</p>
<p>Ich wäre euch sehr sehr dankbar für schnelle Hilfe, da ich sonst ein ernsthaftes Problem habe.</p>
<p>MfG<br />
Florian Eichenberger</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145773</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145773</guid><dc:creator><![CDATA[fl4shchischte]]></dc:creator><pubDate>Thu, 28 Sep 2006 09:16:26 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 09:22:47 GMT]]></title><description><![CDATA[<p>Viel Glück !!</p>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
<p>Gruß,</p>
<p>Simon2.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145777</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145777</guid><dc:creator><![CDATA[Simon2]]></dc:creator><pubDate>Thu, 28 Sep 2006 09:22:47 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 09:43:40 GMT]]></title><description><![CDATA[<p>Du erwartest doch nicht ernsthaft, daß wir uns durch diesen Code durchwühlen, um die relevanten Stellen zu finden.</p>
<p>Such dir doch mal den Punkt heraus, wo der richtige Zustand ausgewählt wird, und arbeite dann dort weiter.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145793</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145793</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Thu, 28 Sep 2006 09:43:40 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 09:45:09 GMT]]></title><description><![CDATA[<p>Doch, so böse wie ich bin, denke ich das. Ich habe sehr wenig Ahnung von C++ und ich weiss nicht, wie man dieses Problem am besten löst. Ich dachte, es gibt vielleicht Leute hier denen das Spass macht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145795</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145795</guid><dc:creator><![CDATA[fl4shchischte]]></dc:creator><pubDate>Thu, 28 Sep 2006 09:45:09 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 10:06:03 GMT]]></title><description><![CDATA[<p>Hallo,<br />
die Aufgabe eines Forums ist nicht deine Maturarbeit zu lösen. Wenn du dein Problem einschränkst und du ein Mindestmaß von Eigeninitiative zeigst, wird dir hier sicher jemand helfen. Einfach Code hinklatschen und dann &quot;macht mal&quot; rufen, funktioniert aber ganz sicher nicht.</p>
<p>Andere Alternative: stell deine Frage im Projekteforum und bietet potentiellen Bearbeitern eine angemessene Aufwandsentschädigung, also genügend Euros.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145811</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145811</guid><dc:creator><![CDATA[HumeSikkins]]></dc:creator><pubDate>Thu, 28 Sep 2006 10:06:03 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 10:43:37 GMT]]></title><description><![CDATA[<p>fl4shchischte schrieb:</p>
<blockquote>
<p>...Ich habe sehr wenig Ahnung von C++ ...</p>
</blockquote>
<p>Mit der Herangehensweise wird das wohl auch so bleiben..... und das wirft ein interessantes Licht auf Dein Maturthema.<br />
Naja, soweit ich weiß, darf man Maturarbeiten wiederholen. Vielleicht probierst Du es das nächste Mal mit etwas, wofür Du mehr Energie als ein wenig Copy&amp;Paste aufbringen kannst.</p>
<p>Gruß,</p>
<p>Simon2.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145834</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145834</guid><dc:creator><![CDATA[Simon2]]></dc:creator><pubDate>Thu, 28 Sep 2006 10:43:37 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 10:55:11 GMT]]></title><description><![CDATA[<p>Lol Simon2 Ich sehe du weisst sehr viel über mich. Du hast zwar keinerlei Ahnung von meiner Maturarbeit, ich denke ich werde sie ganz sicher nicht wiederholen müssen, da die erste Note bis jetz die beste war, die man kriegen kann. Ich brauche nur Hilfe in dieser C++ Frage und sonst gar nicht. Das es eine freche Frage ist, ist mir auch klar, aber wieso soll ich C++ lernen ich werde es nicht brauchen. Trotzdem danke, dass du mir mit deinem qualifizierten Kommentar gholfen hast. Irgendwie muss man ja den Counter heben....</p>
<p>btw. Meine Maturarbeit handel von einem Vergleich von Vogelgrippe und Tuberkulose rein mathematisch eigentlich ohne programmier (aber eben eigentlich ...)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145844</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145844</guid><dc:creator><![CDATA[fl4shchischte]]></dc:creator><pubDate>Thu, 28 Sep 2006 10:55:11 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 10:57:55 GMT]]></title><description><![CDATA[<p>fl4shchischte schrieb:</p>
<blockquote>
<p>aber wieso soll ich C++ lernen ich werde es nicht brauchen.</p>
</blockquote>
<p>Warum brauchst du es dann in deiner Arbeit? Ein Arzt wird auch keine Programmiersprache brauchen, auch <strong>nicht</strong> in seiner Doktorarbeit.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145847</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145847</guid><dc:creator><![CDATA[DarthZiu]]></dc:creator><pubDate>Thu, 28 Sep 2006 10:57:55 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 10:58:47 GMT]]></title><description><![CDATA[<p>Wenn es denn wenigstens C++ gewesen wäre, hätte sich vielleicht sogar jemand gefunden. Aber bei dem Spaghetticode (der im übrigen nicht eine Spur C++ enthält) sicher nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145849</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145849</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Thu, 28 Sep 2006 10:58:47 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 11:04:17 GMT]]></title><description><![CDATA[<p>Ich brauch es ganz allein aus dem einen Grund, dass mein Betreuer mich noch etwas(graphisch) untersuchen lassen will. Es ist ein ziemich abstraktes Referat, wenn man von Class 4 behaviour spricht und sie nicht zeigen kann. Für mich stellt es kein Problem dar, aber der Betreuer hat Angst, dass es niemand verstehen wird ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145854</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145854</guid><dc:creator><![CDATA[fl4shchischte]]></dc:creator><pubDate>Thu, 28 Sep 2006 11:04:17 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 11:07:20 GMT]]></title><description><![CDATA[<p>Und du meinst nicht, dass es andere Werkzeug gibt, mit denen man das einfacher erledigen kann?</p>
<p>Zum Beispiel kann man mit LabVIEW sehr einfach grafische Oberflächen mit Funktionalität versehen, ohne groß programmieren zu können.</p>
<p>Und ich denke, dass du mathematische Zusammenhänge (ich rate jetzt mal ins Blaue, weiß nicht, worum sich der Code da oben dreht) auch in MATLAB oder anderen Mathematiksystemem gut visualisieren kannst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145857</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145857</guid><dc:creator><![CDATA[DarthZiu]]></dc:creator><pubDate>Thu, 28 Sep 2006 11:07:20 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 11:13:00 GMT]]></title><description><![CDATA[<p>Dann denkst du ähnlich wie ich, nur leider denkt mein Betreuer nicht so ... Es muss das ganze geschrieben werden als Programm und in VisualC++ ... Ich glaube ich lass mir von der blöden Teilnote den Schnitt vermiesen x)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145859</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145859</guid><dc:creator><![CDATA[fl4shchischte]]></dc:creator><pubDate>Thu, 28 Sep 2006 11:13:00 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 11:27:39 GMT]]></title><description><![CDATA[<p>fl4shchischte schrieb:</p>
<blockquote>
<p>Ich brauch es ganz allein aus dem einen Grund, dass mein Betreuer mich noch etwas(graphisch) untersuchen lassen will. Es ist ein ziemich abstraktes Referat, wenn man von Class 4 behaviour spricht und sie nicht zeigen kann. Für mich stellt es kein Problem dar, aber der Betreuer hat Angst, dass es niemand verstehen wird ...</p>
</blockquote>
<p>OK,<br />
ich nehm' alles zurück: dein Betreuer scheint eine Pflaume zu sein (kann es sein, dass der Code von ihm ist ?). Ich würde ihm klar sagen, dass Programmieren nicht Bestandteil Deiner Arbeit (und damit der Note) sein kann und wenn er sich da nicht einsichtig zeigt, da nochmal mit Eurem &quot;Prüfungsvorsitzenden&quot; drüber reden. ... kann ja nicht sein, dass Dein Betreuer da so sein Privatspäßchen mit Dir feiert (bzw. Dich dazu benutzt, seinen Code weiterzuentwickeln).</p>
<p>Sorry, aber es kommt hier seeeehr häufig vor, dass Leute hier die Forenmitglieder die Arbeit machen lassen wollen, um selbst gute Informatiknoten zu bekommen.<br />
Es klang mir bei Dir halt auch so.</p>
<p>Tut mir leid, wenn ich Dir damit Unrecht getan habe.</p>
<p>Gruß,</p>
<p>Simon2.</p>
<p>P.S.: 675 Zeilen fremden Spaghetticode durchzuwühlen ist genauso anstrengend wie zeitraubend und unerfreulich. So ziemlich das Gegenteil von &quot;Spaß dran&quot; - deswegen hier die Reaktion. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145869</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145869</guid><dc:creator><![CDATA[Simon2]]></dc:creator><pubDate>Thu, 28 Sep 2006 11:27:39 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 11:33:59 GMT]]></title><description><![CDATA[<p>Ne gecodet ists nicht von ihm, er hat den Code als Vorschlag gebracht weiterzuentwickeln. Und wehren dagegen kann ich mich nicht ... Ist so ein bisschen Mafia like... Betreuer Experte und Co-Betreuer sitzen unter einer Decke <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--smiling_face_with_sunglasses"
      title="8-)"
      alt="😎"
    /> Aber egal vielleicht hat ja jemand ein anständig aussehendes Game of Life parat, welches er mir erklären kann bzw. vielleicht sogar umschreiben und wenn nicht, auch egal.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145873</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145873</guid><dc:creator><![CDATA[fl4shchischte]]></dc:creator><pubDate>Thu, 28 Sep 2006 11:33:59 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 11:37:48 GMT]]></title><description><![CDATA[<p>Naja, man könnte ja was mit reiner polymorphie und rein virtuellen Methoden machen. Am besten noch auf modernste Technik aufgesetzt und die CLR verwendet.</p>
<p>Vllt wendet man ja aber, da es ja um eine Graphische darstellung geht, auch das Entwurfsmuster &quot;Dekorierer&quot; an. Da es ja aber um das Verhalten von Objekten geht eines der vielen Verhaltensmuster anwenden. z.B. die zuständigkeitskette...</p>
<p>Aber vllt. haben die leute hier im Forum auch nur Angst das Du es nicht verstehen könntest wenn man Dir das einfach vor die Nase setzt ^^ <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145876</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145876</guid><dc:creator><![CDATA[Knuddlbaer]]></dc:creator><pubDate>Thu, 28 Sep 2006 11:37:48 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 11:39:59 GMT]]></title><description><![CDATA[<p>Öhm ich versteh zwar nicht was du hier sagt aber nur noch so generell : Tricksen ist nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title="=)"
      alt="🙂"
    /> Entweder ich brings hin ohne zu tricksen oder ich lasse es sein. Es muss streng den Regeln folgen das Programm kein Zufall.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145877</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145877</guid><dc:creator><![CDATA[fl4shchischte]]></dc:creator><pubDate>Thu, 28 Sep 2006 11:39:59 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 11:42:39 GMT]]></title><description><![CDATA[<p>iiih...Class 4 behavior <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /><br />
Pass bloss auf damit <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
<p>Durch den Code wühlen ist, wie schon gesagt, naja...öd</p>
<pre><code class="language-cpp">hBitAlive = LoadImage(hInstance, MAKEINTRESOURCE(IDB_ALIVE), IMAGE_BITMAP, 0, 0, 0);
    if (!hBitAlive)
        return FALSE;
    hBitDead = LoadImage(hInstance, MAKEINTRESOURCE(IDB_DEAD), IMAGE_BITMAP, 0, 0, 0);
    if (!hBitDead)
        return FALSE;
    hBitDead = LoadImage(hInstance, MAKEINTRESOURCE(IDB_SICK), IMAGE_BITMAP, 0, 0, 0);
    if (!hBitSick)
        return FALSE;
    hBitDead = LoadImage(hInstance, MAKEINTRESOURCE(IDB_INFECTED), IMAGE_BITMAP, 0, 0, 0);
    if (!hBitInfected)
        return FALSE;
    hBitDead = LoadImage(hInstance, MAKEINTRESOURCE(IDB_INFECTIOUS), IMAGE_BITMAP, 0, 0, 0);
    if (!hBitInfectious)
        return FALSE;
    hBitDead = LoadImage(hInstance, MAKEINTRESOURCE(IDB_IMMUNE), IMAGE_BITMAP, 0, 0, 0);
    if (!hBitImmune)
        return FALSE;
</code></pre>
<p>Hier zB ladest Du 5 verschiedene Bilder und weist sie dem hBitDead Handle, prüfst aber hBitInfected etc. Kann so nicht funktionieren.</p>
<p>Find grad die Stelle nicht, wo Du die Werte für Infected und soweiter setzt. Wenn ichs richtig sehe benutzt du set_table immer nur mit 0 oder 1. Du musst die anderen Zustände auch noch speichern.</p>
<p>Edit:</p>
<blockquote>
<p>Aber vllt. haben die leute hier im Forum auch nur Angst das Du es nicht verstehen könntest wenn man Dir das einfach vor die Nase setzt ^^ <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
</blockquote>
<p>Jetzt wo Dus sagst..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145879</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145879</guid><dc:creator><![CDATA[THX 1138]]></dc:creator><pubDate>Thu, 28 Sep 2006 11:42:39 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 11:43:47 GMT]]></title><description><![CDATA[<p>Game Of Life?</p>
<p>Hab ich vor zwei Wochen als Entwurfsarbeit abgegeben, allerdings in Java. Sieht sehr schön aus, man kann Zellen per Mausklick setzen und andere Regelwerke einstellen ... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145882</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145882</guid><dc:creator><![CDATA[DarthZiu]]></dc:creator><pubDate>Thu, 28 Sep 2006 11:43:47 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 11:46:40 GMT]]></title><description><![CDATA[<p>Ok 1310-Logik ich hab nur einfach das was mir eingeleuchtet hat, gerade eingesetzt, z.B. die Bilder laden. Kannst du mir sagen wie ich die andere Zustände nun einführen kann ?</p>
<p>Class 4 behaviour ist kewl <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title="=)"
      alt="🙂"
    /></p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/7636">@DarthZiu</a>: Dann schreib mal andere funktionierende Regeln <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145883</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145883</guid><dc:creator><![CDATA[fl4shchischte]]></dc:creator><pubDate>Thu, 28 Sep 2006 11:46:40 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 11:52:56 GMT]]></title><description><![CDATA[<p>fl4shchischte schrieb:</p>
<blockquote>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/7636">@DarthZiu</a>: Dann schreib mal andere funktionierende Regeln <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
</blockquote>
<p>Wie meinst du das? Regelwerke im Programm umsetzen? No Prob</p>
<p>Neue Regelwerke schreiben? Brauch ich nicht, bin Informatiker und kein Biologe, theoretischer Mathematiker oder ähnliches ... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145890</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145890</guid><dc:creator><![CDATA[DarthZiu]]></dc:creator><pubDate>Thu, 28 Sep 2006 11:52:56 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 11:59:14 GMT]]></title><description><![CDATA[<p>fl4shchischte schrieb:</p>
<blockquote>
<p>Class 4 behaviour ist kewl <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title="=)"
      alt="🙂"
    /></p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /> Schonmal damit gearbeitet? Mir reicht Level 2 (Baculoviren und Staph Aureus, ausserdem Humanblut sprich potentiell Hep. und HIV ), is gar nicht so kuhl <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_down"
      title=":-1:"
      alt="👎"
    /></p>
<p>btt: ich blick irgendwie nicht, wo Du malst.<br />
Also Deine table besteht ja aus chars, da kannst du für jeden Zustand ein Zeichen definieren (btw, würd ich eher mit unsigned short machen) 0 = tot, 1 = krank, 2 = infektiös...<br />
Dann musst Du in table_next entsprechend mehr Schritte einbauen, sind 2 oder 3 Nachbarn infektiös oder krank, wird xy infiziert, zwei Zyklen später infektiös, 3 Zyklen später krank und nochmal später stirbt xy.</p>
<p>Im Prinzip ein Game of Life mit mehreren Zuständen/Lebensphasen,<br />
aber das Auscodieren überlass ich Dir. :p</p>
<p>edit: Ausserdem gibts solche Programme doch schon wie Sand am Meer, warum verlangen die das von Dir?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145897</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145897</guid><dc:creator><![CDATA[THX 1138]]></dc:creator><pubDate>Thu, 28 Sep 2006 11:59:14 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 12:11:16 GMT]]></title><description><![CDATA[<p>für wie viel würdest du das auscodieren übernehmen ? (einen sauberen Code) ich hab einfach keinen Nerv mehr dafür. Class 4 behaviour abriete ich ziemlich viel damit. Natürlich ist HIV nicht toll, war auch nicht so gemeint.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145905</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145905</guid><dc:creator><![CDATA[fl4shchischte]]></dc:creator><pubDate>Thu, 28 Sep 2006 12:11:16 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 12:22:49 GMT]]></title><description><![CDATA[<p>fl4shchischte schrieb:</p>
<blockquote>
<p>für wie viel würdest du das auscodieren übernehmen ? (einen sauberen Code) ich hab einfach keinen Nerv mehr dafür.</p>
</blockquote>
<p>Sorry is nich. Hab im Moment keinen funktionierenden PC, und ausserdem bin ich nicht gut genug, das hinzukriegen.</p>
<p>fl4shchischte schrieb:</p>
<blockquote>
<p>Class 4 behaviour abriete ich ziemlich viel damit. Natürlich ist HIV nicht toll, war auch nicht so gemeint.</p>
</blockquote>
<p>OT: <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> Holst Du die Matur nach oder warum machst Du mit Viren rum?<br />
Wo gibts denn ein Level4 Labor in der Schweiz? Oder bist Du kein Schweizer? (wegen &quot;Chischte&quot; nehm ich das mal an)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145910</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145910</guid><dc:creator><![CDATA[THX 1138]]></dc:creator><pubDate>Thu, 28 Sep 2006 12:22:49 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 12:29:03 GMT]]></title><description><![CDATA[<p>LOl ich glaube wir rede grad komplett von was anderem. Die Class 4 behaviour hat damit zu tun, das sich alles nicht nach Chaos und nicht nach Regelmässigkeit ändert (Game of Life, Rule110, usw). Mit lebendigen Viren hat das wenig auf sich. Ich bin eher der Typ, der mit den Krankehiten rechnet, als jener der wirklich damit in Berührung kommt. Nein ich mache ganz normal die Matur, habe aber einig Nebenjobs.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145913</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145913</guid><dc:creator><![CDATA[fl4shchischte]]></dc:creator><pubDate>Thu, 28 Sep 2006 12:29:03 GMT</pubDate></item><item><title><![CDATA[Reply to Express-Hilfe benötigt on Thu, 28 Sep 2006 12:44:36 GMT]]></title><description><![CDATA[<p>Aso <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /> ich war wo ganz anders <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /><br />
Bei class 4 und infectious denk ich halt an Class 4 Viren.<br />
Naja nichts für ungut.</p>
<p>PS: Probiers im Projekt-Forum, wenn Du das Programm geschrieben haben willst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145915</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145915</guid><dc:creator><![CDATA[THX 1138]]></dc:creator><pubDate>Thu, 28 Sep 2006 12:44:36 GMT</pubDate></item></channel></rss>