Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.19 seconds.

  1. Replies
    1
    Views
    77

    Also here -> printf( ... , comma and then...

    Also here -> printf( ... , comma and then followed by - C++ Forum
  2. Replies
    8
    Views
    121

    > newTexte += alphabet[temp1]; C doesn't have...

    > newTexte += alphabet[temp1];
    C doesn't have the ability to build up a string from a set of characters through addition.



    printf("%c\n", 'A' + '$' );

    This will print 'e', not "A$".
    ...
  3. Replies
    10
    Views
    210

    > I tried single while loop in function code...

    > I tried single while loop in function code doesn't delete specif node.
    That's because you didn't read what I wrote.





    struct node *deleteNode(int n, struct node *head ) {
    struct node...
  4. Replies
    10
    Views
    210

    So what's the purpose of your 2nd while loop. ...

    So what's the purpose of your 2nd while loop.

    You only need one while loop, and that one I posted.

    At that point, node is pointing to the node you want to delete.
    You don't need another loop.
  5. Thread: Skip Instruction

    by Salem
    Replies
    1
    Views
    68

    I think you need to find a better way of posting...

    I think you need to find a better way of posting your code than as a massively long URL containing an image.
  6. Replies
    10
    Views
    210

    Your first while loop should be something like ...

    Your first while loop should be something like


    prev = NULL;
    while ( node && count < n ) {
    prev = node;
    node = node->next;
    count++;
    }
  7. Replies
    10
    Views
    210

    Deleting a node should only call free() Why...

    Deleting a node should only call free()

    Why do you want to make a new node, if all you're doing is trying to remove one.

    Try something simple first, just remove the first node of the list...
  8. What? You mean you never actually tried this? ...

    What?
    You mean you never actually tried this?


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

    struct player
    {
    int number;
  9. Replies
    10
    Views
    210

    Oh it deletes it just fine. Your code is...

    Oh it deletes it just fine.

    Your code is broken because it keeps a second reference to your deleted node (in the form of first->next).

    You need to stop hand rolling lists and write some...
  10. Nothing happens because you kill the child...

    Nothing happens because you kill the child immediately.

    Oh, and your indentation needs work.


    #include <signal.h>
    #include <stdio.h>
    #include <unistd.h>

    void sigHandler(int sig)
  11. Replies
    2
    Views
    101

    It started over there -> UML class diagram to...

    It started over there -> UML class diagram to code translation - C++ Forum
    No idea if any progress has been made.
  12. Here's what cross-posting means to us. How To...

    Here's what cross-posting means to us.
    How To Ask Questions The Smart Way
    How To Ask Questions The Smart Way

    Cross-posters tend to get ignored when there MO becomes apparent.

    Because it's a...
  13. Replies
    4
    Views
    140

    > I have doubt Am I printing correct value of N...

    > I have doubt Am I printing correct value of N
    Yes you are.


    No, such a thing would be a false assumption.


    Two malloc'ed pointers are un-comparable.
    You can't infer anything from...
  14. Replies
    4
    Views
    231

    OK, so what do you want us to do about it?

    OK, so what do you want us to do about it?
  15. How did you manage to write nearly 1000 lines of...

    How did you manage to write nearly 1000 lines of code, only to discover that it doesn't work.

    You have badly mis-matched braces in your code, and this will cause the error you see.

    You need to...
  16. Do you have any books on learning C++? Data...

    Do you have any books on learning C++?

    Data Encapsulation in C++ - Tutorialspoint
  17. Replies
    2
    Views
    168

    Ask here perhaps?...

    Ask here perhaps?
    https://opcfoundation.org/forum/

    If you're asking about a specialist "foo" feature (like a library), it's best to search "close to home" as it were.

    This is a general C/C++...
  18. Replies
    4
    Views
    164

    You only need ONE variable for your list. ...

    You only need ONE variable for your list.

    You're confusing yourself with all that first, second, third stuff.


    struct node *head = NULL;

    head = newNode(10, head);
    head = newNode(20,...
  19. Thread: Reading a file

    by Salem
    Replies
    1
    Views
    128

    > printf("Day = %s\n", &product.day); >...

    > printf("Day = %s\n", &product.day);
    > printf("Customer = %s\n", &product.customer);

    Well you don't normally use & when printing stuff.
  20. Replies
    1
    Views
    104

    scanf(" %c %d %f",&s1.name,&s1.rollno,&s1.marks);...

    scanf(" %c %d %f",&s1.name,&s1.rollno,&s1.marks);
    scanf(" %c %d %f",&s2.name,&s2.rollno,&s2.marks);
    scanf(" %c %d %f",&s3.name,&s3.rollno,&s3.marks);

    Put a space before each %c in scanf,...
  21. Apart from trying somewhere else as well ;) C -...

    Apart from trying somewhere else as well ;)
    C - Travelling Through Maze Recursively & Inserting Nodes In All S - C And C++ | Dream.In.Code
  22. > Salem, it's my topic on other site too (why you...

    > Salem, it's my topic on other site too (why you left a link to this forum in that thread?).
    It's for the benefit of everyone who might care enough to help you.
    Like for example,
    - not wasting...
  23. You mean like for ( int i = 0 ; i < 10 ; i++...

    You mean like


    for ( int i = 0 ; i < 10 ; i++ ) {
    head=front(head,i);
    }


    Work on a function to print your list.
  24. How to display all files, subfiles and d - C++...

    How to display all files, subfiles and d - C++ Forum
  25. Replies
    3
    Views
    140

    Too much guessing on your part. Convert COBOL...

    Too much guessing on your part.

    Convert COBOL to C


    It seems your C is pretty weak as well.

    Interoperability between different languages usually requires that you are pretty competent at...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4