Forum: C Jun 13th, 2009 |
| Replies: 8 Views: 821 void* ptr = buf_ptr[20]; //----------->error
what i want to say is "buf_ptr[20]" is not a pointer,it's
the value of the 20th in buf_ptr |
Forum: C Feb 28th, 2008 |
| Replies: 3 Views: 521 first of all,u should add seed of random data
void srand( unsigned int seed );
use current time as seed! |
Forum: C Feb 27th, 2008 |
| Replies: 6 Views: 680 use "pointer" to define ur function like this
void PrintMatrix(int *matrix);
and it will work good! |
Forum: C Dec 18th, 2007 |
| Replies: 41 Views: 50,798 while(true)
{
printf("it's good idea,and all of those can help us to learn c program well!\n");
} |
Forum: C Dec 18th, 2007 |
| Replies: 41 Views: 50,798 |
Forum: C Dec 18th, 2007 |
| Replies: 11 Views: 1,705 hoho,I am sorry for my naive.
i am chinese,what i want is learning english,and make friends with whom i want. |
Forum: C Dec 18th, 2007 |
| Replies: 11 Views: 1,705 #include <stdio.h>
#include <conio.h>
void main( void )
{
int integer;
char string[81];
/* Read each word as a string. */
printf( "Enter a sentence of four words with scanf: "... |
Forum: C Dec 18th, 2007 |
| Replies: 11 Views: 1,705 I don't agree with U.
u can search "fflush" in MSDN!
and it's give the example like this:
/* FFLUSH.C */
#include <stdio.h>
#include <conio.h>
void main( void ) |
Forum: C Dec 18th, 2007 |
| Replies: 11 Views: 1,705 U can try to use function like "fflush(stdin)",when u call it ,it can also clear the input buffer |
Forum: C Dec 17th, 2007 |
| Replies: 3 Views: 2,347 // fill in the array is not shown here
qsort(array, NumStrings, sizeof(array[0]), compare);
here,"sizeof(array[0])" is 20bytes;
// fill in the array is not shown here
qsort(array,... |