Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.24 seconds.

  1. There's no need to cross-post on the same forum....

    There's no need to cross-post on the same forum.
    Here -> How print this series and what is the logic behind this binary series.
  2. Replies
    3
    Views
    134

    Yes.

    Yes.
  3. Duplicated here, and school copyrighted material...

    Duplicated here, and school copyrighted material deleted.
    C ++ Program compilation result result still error
  4. > the code is successfully compiled but I'm sill...

    > the code is successfully compiled but I'm sill getting a wrong (compiler error issue) when submission
    Well I guess the important thing to check is whether you're supposed to be submitting C code...
  5. Replies
    3
    Views
    134

    Yes, that's right.

    Yes, that's right.
  6. Thread: being dumb again

    by Salem
    Replies
    1
    Views
    126

    > return primes[PrimeIndex]; The basic problem...

    > return primes[PrimeIndex];
    The basic problem is you can't return an array.

    This would fix the syntax error.
    return primes;

    But the problem is, your array goes out of scope by the time the...
  7. Replies
    1
    Views
    194

    > scanf("%c", &user_input); Maybe you want...

    > scanf("%c", &user_input);
    Maybe you want
    scanf(" %c", &user_input);
    The leading space means you skip newlines etc and read the next visible printable character.

    It's only 'ignoring' because...
  8. Replies
    10
    Views
    447

    Well if you only want the first line excluding...

    Well if you only want the first line excluding the \n, then do this


    while ((c = fgetc(fp1)) != EOF && c != '\n')
    fputc(c, fp3);

    Then it doesn't matter what the input file has at the...
  9. It isn't a pointer. > ...

    It isn't a pointer.
    > process_packet_options_record_t process_packet_options_record;
    So there is nothing to malloc.
  10. Change your structure to struct Human { ...

    Change your structure to


    struct Human {
    char name[30];
    int age;
    };


    Pointers have to be dealt with separately when it comes to reading and writing to files.
  11. Replies
    10
    Views
    447

    > I see, so in this particular instance I would...

    > I see, so in this particular instance I would need some form of internal error level check to establish the file to be read
    > is in the first place a text-file in composition & not for e.g. a...
  12. Replies
    1
    Views
    241

    Because str4 doesn't have a \0 to mark the end of...

    Because str4 doesn't have a \0 to mark the end of the string.

    So printf just keeps running through memory until it finds a \0.

    In your case, that just happened to be your str3.

    But it could...
  13. Replies
    7
    Views
    339

    > btw how do you shut down gdb without closing...

    > btw how do you shut down gdb without closing the terminal as no matter what basic sense command I tried nothing worked
    Try the 'quit' command.

    > I didn't want to keep typing shared_mem and...
  14. Replies
    5
    Views
    303

    You're confused, because it's a crap example to...

    You're confused, because it's a crap example to work from to begin with.

    The program is off in the weeds somewhere as soon as it starts doing anything with p+1

    Draw out some memory diagrams...
  15. Replies
    10
    Views
    447

    > so if I am reading you correctly for medium to...

    > so if I am reading you correctly for medium to long term use dev-cpp is kinda ring fenced to XP & is only really suitable for say small programs below say < 64Kb.
    No, the IDE part is crap.
    You...
  16. Replies
    7
    Views
    339

    The first thing I would do is rip out all that...

    The first thing I would do is rip out all that ifdef WIN32 rubbish until you've got the POSIX version working properly.

    Next,
    #define P_RD 0
    #define P_WR 1
    so things like
    wrpipe(...
  17. Replies
    10
    Views
    447

    > so then I installed, after a further...

    > so then I installed, after a further recommendation DEV-CPP V4.9.9.2 as it is allegedly better suited or easier for beginners to navigate and understand in terms of usage?
    Not really, it's just...
  18. Replies
    1
    Views
    215

    I would suggest you do case '1': ...

    I would suggest you do


    case '1':
    doInsects();
    break;
    case '2':
    doBirds();
    break;
    case '3':
  19. Replies
    5
    Views
    308

    So am I. So you've already seen how I use gcc....

    So am I.
    So you've already seen how I use gcc.
    Now you can do the same.
  20. struct pcap_user_data { new_activity_list_t...

    struct pcap_user_data
    {
    new_activity_list_t *new_activity_list;
    process_packet_options_list_t *process_packet_options_list;
    };
    typedef struct pcap_user_data...
  21. >...

    > pthread_mutex_init(&pcap_user_data->new_activity_list->mutex,NULL);
    I figure it should be
    pthread_mutex_init(&pcap_user_data->new_activity_list.mutex,NULL);
  22. Replies
    5
    Views
    308

    Well which compiler / IDE are you using?

    Well which compiler / IDE are you using?
  23. Replies
    5
    Views
    308

    1, indentation really helps to see what's going...

    1, indentation really helps to see what's going on.


    #include <stdio.h>
    #include <stdlib.h>

    int main()
    {
    int Option, ResCount, Resistors, ResValue, ResTotal;
    ResCount = 0;
  24. Yeah, 500 lines of poorly formatted code...

    Yeah, 500 lines of poorly formatted code containing goto's is not a good start.

    You have a lot of printf's in there, perhaps you could post those as well.
    Bear in mind that either we can't run...
  25. You need to return the new length of the array,...

    You need to return the new length of the array, after you've removed the duplicates.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4