thanks for ur concern
i've figured out my problem and finished counting
thanks a lot everyone :)
Type: Posts; User: ChoCo
thanks for ur concern
i've figured out my problem and finished counting
thanks a lot everyone :)
my problem now is that i don't know what's wrong about my adding node part T_T;
else
{
current = current->next;
}
my current pointer in here doesn't seem to move anywhere but staying at the start.
can...
why does i assign current to start??
i'm confused now = =a
it's said sth like incompatible type of pointers
but i think i've figured out my problem in the structure, it should be
typedef struct node
{
char alpha;
int freq;
struct node*...
I have move the current thing in here, and the program doesn't crash anymore :))
if(start == NULL)
{
printf("test1\n");
start =...
i don't really understand what you mean ??? = =
but i try taking out the allocate thing of current and it's still crashed...
My current code is now
#include <stdio.h>
#include <ctype.h>
typedef struct node
{
char alpha;
int freq;
struct node* next;
so if i also want to count the frequency of the space then i should use the fgets one
because the fscanf doesn't read space, right?
May i ask a bit more,
what is the difference between these two
>while(fgets(buffer,127,pInfile)!=NULL)
>while ( fscanf( pInfile, "%s" , buffer ) != EOF )
or are they the same?
Thanks for helping !
This clear my confusion :)
the end doesn't include space bar right?
while(fgets(buffer,127,pInfile)!=NULL)
{
for(i = 0; buffer[i]; ++i)
{
buffer[i] = tolower(buffer[i]);
printf("%c",buffer[i]);
...
Thanks a lot :)
This program suppose to count the string length that are A-Z,a-z, and 0-9 using recursion but it counts everything, why??
#include <stdio.h>
int count(char string[])
{
int i = 0;
...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "structure.h"
#include "valid.h"
int checkCode(char* codeString,DATA_T* pResult)
{
This is an unfinished file name immigration.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "structure.h"
#include "modifyImmigration.h"
int main(int argc,char*...
Thanks a lot ^^
This is a file name valid.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "valid.h"
#include "structure.h"
Why when i type "none" for drink type, it doesn't print BILL.
Here is the code.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#define MAX 30
int main()
When compile, the red line is
error, invalid lvalue in assignment
How to fix this?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX 30
Sorry to ask a lot, because i'm very new to c programming
can you explain,
1. what is while(1)?
2. why do you use
while(drink type length > 0); to loop?
I mean it already loop until None already
but I also want to check if the user doesn't type anything, the program should ask again
and if the user type in sth but it's not None, the program should...
i see...
is there a way to fix this?
the program want to ask the type of drink until None
but if the user type nothing, i want it to ask again.
i mean the small loop of strlen
eventhough i type in sth, it still loops