Search:

Type: Posts; User: mlsbbe

Search: Search took 0.01 seconds.

  1. Thread: Encrpytion

    by mlsbbe
    Replies
    8
    Views
    1,623

    Yes, I am quite good in mathematics. So I hope I...

    Yes, I am quite good in mathematics. So I hope I can handle the mathematics for encrpytion.:)
  2. Thread: Encrpytion

    by mlsbbe
    Replies
    8
    Views
    1,623

    Encrpytion

    Does anybody know any good sites that teaches encryption in C to a beginner?
  3. Replies
    0
    Views
    996

    Can't access the FAQ

    For some reason I can't access the FAQ at faq.cprogramming.com. It just gives me a blank screen.

    ---Edit---
    I found the problem. For some reason, my browser doens't redirect to the page.
  4. Replies
    4
    Views
    1,686

    Validating string for integers

    I want to validate the string below for integers, and if there is a letter, I want the program to exit.

    >>name,1,2,3,4

    if the string is something like this

    >>name,1,23,34,2a

    I want the...
  5. Replies
    6
    Views
    1,065

    Thanks for the help. How about this code? Which...

    Thanks for the help. How about this code? Which one would be better this time?



    #include <stdio.h>
    #define MAXSTUDENT 4
    #define MAXNAME 20

    typedef struct{
    char name[MAXNAME+1];
  6. Replies
    6
    Views
    1,065

    Best way og doung this code?

    Hi, I want to ask which is the better way for doing the following code? Like this:



    #include <stdio.h>
    #define MAXSTUDENT 4
    #define MAXNAME 20

    typedef struct{
    char name[MAXNAME+1];
  7. Thread: Structures

    by mlsbbe
    Replies
    7
    Views
    1,045

    >>If you have an array of structs, you'll need to...

    >>If you have an array of structs, you'll need to pass a struct pointer which references the first element of the array, then loop through the array.

    Can you give me an example of how to do that?
  8. Thread: Structures

    by mlsbbe
    Replies
    7
    Views
    1,045

    Thanks everybody, but it wasn't what i meant. I...

    Thanks everybody, but it wasn't what i meant. I want to point to the members of a structure array, and pass that into a function, instead of passing the whole structure in and then accessing the...
  9. Thread: Structures

    by mlsbbe
    Replies
    7
    Views
    1,045

    Structures

    Does anybody know how to pass the members of an array of structure as a pointer into a function? I have absolutely no clue how to do this.




    typedef struct{
    int a,b;
    }myst;

    int...
  10. Replies
    2
    Views
    1,000

    argg..sorry. Its probably because I only posted...

    argg..sorry. Its probably because I only posted part of my code here.
    I've just had this idea and I'll try work on it. Thankyou for the help .:)
  11. Replies
    5
    Views
    13,448

    i've just started a new thread - 'File IO help...

    i've just started a new thread -
    'File IO help please'
    and i've explained my problem better I think. Thankyou for the help! T:)
  12. Replies
    2
    Views
    1,000

    File IO Help Please

    I want to read from the text file :


    John,1,2,3,4
    Smith,2,3,4,5
    Jones,4,5,6,7


    How would I detect an empty line in the file and tell the user that the line is missing? For example (the...
  13. Replies
    5
    Views
    13,448

    Stuck on this for ages....Please Help!

    I've remade the file so that now I can compile it. However, this time, it doesn't skip out the line


    if (p_error==NULL)
    {
    printf("\nError in reading file"); /*EOF error*/
    }


    even...
  14. Replies
    5
    Views
    13,448

    fgets error handling

    Does anybody know why my code for error handling in fgets doesn't work? I've been trying to make this work for ages, and still cannot get this to work. What happens is that instead of skipping the...
  15. Thread: File IO

    by mlsbbe
    Replies
    12
    Views
    1,423

    Woops..sorry

    I tried it on my computer at home and now it works. Thanks very much! =):)
  16. Thread: File IO

    by mlsbbe
    Replies
    12
    Views
    1,423

    Code doesn't work

    I tried your code on my compiler, but it doesn't work.:confused:
  17. Thread: File IO

    by mlsbbe
    Replies
    12
    Views
    1,423

    yes

    Yes, i know that placing spaces in between would make it easier. But i want to know why it doesn't work it I use the comma operator?

    If it does, how can I make fscanf read the line of text?
  18. Thread: File IO

    by mlsbbe
    Replies
    12
    Views
    1,423

    For some reason, fscanf seams to be only taking a...

    For some reason, fscanf seams to be only taking a whole line from the text file and storing it in the string member of the structure. But I want the line to be stored in seperately into different...
  19. Thread: File IO

    by mlsbbe
    Replies
    12
    Views
    1,423

    I've tried changing &student[i].name to...

    I've tried changing &student[i].name to student[i].name, but i still can't read the file. The compiler gives something like:
    "Data if 'int' supplied where pointer is required"



    #include...
  20. Thread: File IO

    by mlsbbe
    Replies
    12
    Views
    1,423

    still stuck

    I am still stuck. How would you tell fscanf to read a new line from the data and store it?
    I can't give it a value like EOF, since this would mean the end of the file, not a new line.

    Again,...
  21. Thread: File IO

    by mlsbbe
    Replies
    12
    Views
    1,423

    File IO

    I want to scan a text file:


    jones,1,2,3,4
    smith,2,3,4,5
    john,57,65,4,2
    catherine,25,64,78,65


    I want ask a few questions:
  22. Replies
    2
    Views
    1,012

    Thanks!

    Thanks,
    Its much clearer now!
  23. Replies
    2
    Views
    1,012

    Pointers to structures

    In my book, it says that for a structure e.g.
    x.name
    is equivalent to:
    x->name
    however, when I tried to write a program using it, only
    x->name will take in the values. I want to know why.
    See...
  24. Thread: structures

    by mlsbbe
    Replies
    8
    Views
    1,377

    structures

    Hello, I am a newbie to C programming, so forgive me if the questions I ask sound stupid.
    I am trying to create a program to calculate complex numbers using structures.
    I want to pass the value of...
Results 1 to 24 of 24