473,396 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Memory game--> HELP

I am looking for the game 'memory' in C code.
This is pretty urgent, so any replies would be appreciated.
Thanx
Dec 18 '06 #1
4 2018
r035198x
13,262 8TB
I am looking for the game 'memory' in C code.
This is pretty urgent, so any replies would be appreciated.
Thanx
This is not a vey good way of asking for help. Perhaps you should have a look at the posting guidelines.
Dec 18 '06 #2
And which guide line would you be referring to?
I am looking for the function code of the game. How is that a problem to you?
Dec 21 '06 #3
r035198x
13,262 8TB
And which guide line would you be referring to?
I am looking for the function code of the game. How is that a problem to you?
I was refering to these guidelines.

As you can see by the number of responses you got that people here are more inclined to help those who are willing to put in some effort themselves first.
Dec 21 '06 #4
ok well ... this is what i got so far. The idea is to lett the user put in the amount of rows and colums for the memory game. but i cant get it to work. basicly i suck at programming, but i gotta find how to make this work. also the table (memory field) has to get filled with black boxes, and when clicked on (using conio.h) it should show whats under it (the memory sign).
btw rij (rijen) means row/rows
and kolom/kolommen means colums
so NOW can anyone help me out?


#include <stdio.h>
#include <string.h>
#include <stdlib.h>

/*
char k=128;
printf("Het Asci teken: %c",k);
*/

int main(void)
{
char**rijen;
char**kolommen;
char k=128;
int rij, kolom, i, j;
printf("Geef het aantal rijen: ");
scanf("%d%*c", &rij);
rijen = calloc( sizeof(char*), rij);
printf("Geef het aantal kolommen: ");
scanf("%d%*c", &kolom);
kolommen = calloc( sizeof(char*), kolom);

for (i=0;i<rij;i++)
{
strcpy(rijen[i], k);
}
for (j=0;j<kolom;j++)
{
strcpy(kolommen[j], k);
}
for (i=0;i<rij;i++)
{
printf("%c",rijen[i]);
free(rijen[i]);
}
for (j=0;j<kolom;j++)
{
printf("%c",kolommen[i]);
free(kolommen[j]);
}
return 0;
}
Dec 23 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Scott | last post by:
We have about 4 .net applications on a windows 2000 IIS5 server, and recently the memory of the aspnet_wp.exe process has been increasing quickly until the process is automatically recycled do to...
0
by: JP | last post by:
In my application I use several class files that contain reusable code. I create an instance of a class (once) when ever I need to use it. //stand-alone cs file XHTML_Library objXHTMLHolder =...
2
by: Sambucus | last post by:
Hi group! I am using C++ and java with JNI to get some text in a RICHEDIT to my java program. I do so by accessing a C++ method every second. It all works fine except that it leaks memory every...
8
by: spoc | last post by:
I am using VC++6 and Numega bounds checker and have been getting many STATIC MEMORY OVERRUN errors (boundschecker) while trying to track down bugs. An example is below: void func() { static...
3
by: hippo | last post by:
trying to get some old stuff off an old database. installed access 97,yes access 97. on a W2K, update4 machine with 500mg ram. ALL other programs run great. i get: 'out of memory' "A system error...
8
by: William Morgan | last post by:
is there a way to take a string that has binary data in it and put it in the memory stream? everything i try will not work. it wants it in bytes. and i don't see a way to convert it over.. ...
10
by: electrixnow | last post by:
I have the following test code that opens and reads a file. The file is over 19000 lines long. The file contains two fields on each line: "text,text\n" I have placed a test that for loops up to...
2
by: O.B. | last post by:
Given the two following structures: public struct Articulation { public byte typeDesignator; // 1 byte public byte changeIndicator; // 1 byte public Unsigned16 attachmentID; // 2...
12
by: bomahony | last post by:
Im runnign various versions of DB2 on various UNIX platforms (Solaris / AIX). DB2 is generally eating up about 30% of memory on these systems (4Gb of RAM, which equates to over a gig). i want to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.