Search:

Type: Posts; User: Aviel Krantz

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    4,538

    Need an idea how to reset a struct

    Hello!
    I have a struct named profile, inside the profile I have all kind of info, example:


    typedef struct info
    {
    char *phone;
    char *name;
    .....
    }info;
  2. Replies
    28
    Views
    2,156

    It popped a message: Ac access violation...

    It popped a message:
    Ac access violation (segmentation fault) raised in your program.
  3. Replies
    28
    Views
    2,156

    Did it edit: Ok I tried...

    [/QUOTE]

    Did it




    edit:

    Ok I tried it, when I enter an invalid email like [email protected] it asks me to re-enter, but when I enter [email protected] it crashes...
  4. Replies
    28
    Views
    2,156

    But Users != NULL... the thing is I tried to...

    But Users != NULL...

    the thing is I tried to do something but it still crashes....


    char* emailGet(char *email)//getting the email
    {
    users *current = Users;
    point:
    ...
  5. Replies
    28
    Views
    2,156

    I meant something else, the thing with the loop...

    I meant something else, the thing with the loop is that, I start the program with a Users = NULL (a global struct) and I start building from him, so now I don't have anything in the Users->next field...
  6. Replies
    28
    Views
    2,156

    I edited my last message, I understand why it...

    I edited my last message, I understand why it crashes, there is only one NODE at first, so it wont even go inside the loop, the only way to solve it is to add a condition in the start, but the...
  7. Replies
    28
    Views
    2,156

    The thing is, as I understand it, if I allocate...

    The thing is, as I understand it, if I allocate 20 chars and only use 10, than the other 10 are gone, and that means if someone will later edit the email and will enter a 20 chars email it will leak....
  8. Replies
    28
    Views
    2,156

    "email" has been "malloced" outside the function...

    "email" has been "malloced" outside the function before the function was called,
    I changed the goto, I used it just because it makes it look less messy.
    and I don't see any other way of the loop to...
  9. Replies
    28
    Views
    2,156

    Ok all of the errors are fixed, now time for some...

    Ok all of the errors are fixed, now time for some bugs...

    So I have this function:


    char* emailGet(char *email)//getting the email
    {
    users *current;
    point:
    current = Users
  10. Replies
    28
    Views
    2,156

    Ohh I just watched this realloc my bad it used to...

    Ohh I just watched this realloc my bad it used to be a malloc..
    Ok, I understand you!

    now one more thing, what am I supposed to understand from this error?
  11. Replies
    28
    Views
    2,156

    Ok I got you both, but for example can I do...

    Ok I got you both, but for example can I do this?:


    char* emailGet(char *temp)//getting the email
    {
    printf("Enter email: ");
    scanf("%s",temp);
    while(emailCheck(temp) == 1)//if...
  12. Replies
    28
    Views
    2,156

    I do have the first function you've mentioned it...

    I do have the first function you've mentioned it just mallocs a char pointer, so your'e saying I should get rid of it?
  13. Replies
    28
    Views
    2,156

    A function that returns char*

    Hey guys!
    I was wondering, if I have a function like so:
    char* function()

    {
    char *x;
    ......
    ......
    ......
    return X
Results 1 to 13 of 13