I study the data structure,
met a strange problem.
I used preorder method to create a binary tree;
code :
#include<stdio.h>
typedef struct node {
int data;
struct node...
Type: Posts; User: angeljicu
I study the data structure,
met a strange problem.
I used preorder method to create a binary tree;
code :
#include<stdio.h>
typedef struct node {
int data;
struct node...
ok thanx very much
void printOneWord(char *pstart)
{
int i;
for(i=0;i<strlen(pstart);i++)
{
switch(pstart[i])
{
case ONE:
printf("One ");
break;
have you add "#include<dos.h>"?
often I couldnot express my idea well.
I would do my best.
I would write something about random number and its application.
I think that's necessary.;)
as you say,i just knew,thank you all.
i tried,found some wrong
#include<stdio.h>
main()
{
char *string;
FILE *fp;
clrscr();
fp=fopen("c:\\file.txt","r");
while(fread(string,sizeof(char),20,fp));
i modified it and found more problem
first,i can't find a way to solve the array which could make
the char and num exist at one time.
second, the randnum sometimes overstep the max i defined...
i use turboc2 to compile and run:)
:cool:
It's a game for you to bet,I think there are some more stimulateion which could be added into it.
That is I often have some ideas,I add to my program,
I need you all,give me some...
:confused:
I often write some programs,those are some smallest games.
always something wrong in my programs.
I put out some to you,all the intentness friends.
maybe you could give me some...
Hum.........
you have forgot to add something
{
.....
char buffer[BUFSIZ] = {127};
FILE *pFile;
char *p;
clrscr();
window(10,10,70,20);
I like ARPG games,e.g. Baldur' Gate.
In the game,at first you must roll to decide your character's 6 attribute.It use 3 dices which each has 6 sides.
We can write a program to realize it.
...
In our books,I even cannot find a line like you have corrected for me :)
"char buf[BUFSIZ] = { 127 };
/* Sure the buffer is bigger than 127, but what do I care? */"
why can we used a...
In my opinion,you need to add a line
#include <stdio.h>
#include <conio.h>
main()
{
char string[512];
char *p;
clrscr();
window(10,10,70,20);