Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.17 seconds; generated 30 minute(s) ago.

  1. Replies
    6
    Views
    140

    Well you can post as is for now. But generally,...

    Well you can post as is for now.
    But generally, if you're posting on an English speaking forum, you should write your code in English to ensure that the majority can read it.
  2. Thread: Assignment Help

    by Salem
    Replies
    1
    Views
    342

    > OR mask1 with num1, print the result > ...

    > OR mask1 with num1, print the result
    > toggle num1, print the result
    None of your code does either of these things.

    You might save some confusion by renaming your 'bit_mask' to...
  3. Replies
    6
    Views
    140

    > I already wrote a bit of the code, but it haves...

    > I already wrote a bit of the code, but it haves many errors.
    Well that's a good place to start.
    Post what you have, then we can help.
  4. Replies
    3
    Views
    302

    Does this work? #include #include...

    Does this work?


    #include <stdio.h>
    #include <stdbool.h>
    struct Node
    {
    int data;
    struct Node *next;
    };
  5. Replies
    8
    Views
    231

    > I know I could use functions, but teacher told...

    > I know I could use functions, but teacher told me to do the game all in function int main(),
    So do it using functions to make it work, then inline it all to make a mess for teacher.

    I can't...
  6. Replies
    1
    Views
    109

    I guess you start here and get comfortable for a...

    I guess you start here and get comfortable for a nice long read.
    macOS - Apple Developer

    The framework used to be called cocoa, but that was a couple of OS versions ago.
    Programming Mac OS X...
  7. Replies
    8
    Views
    231

    A couple of thoughts. 1. Indentation -...

    A couple of thoughts.
    1. Indentation - seriously.


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

    int main()
  8. Replies
    3
    Views
    302

    Are you allowed to do things like - copy found...

    Are you allowed to do things like
    - copy found entries into a list that only contains unique instances
    - clone the list you have so you're free to remove all duplicates

    > 1,2,1,1,3,4
    The tricky...
  9. Thread: Date validation

    by Salem
    Replies
    1
    Views
    106

    Something like this tProduct milk;...

    Something like this


    tProduct milk;
    dateInit(&milk.bestBeforeDate, 25, 12, 2020 );
  10. $ gcc -Wall -g foo.c $ gdb -q ./a.out Reading...

    $ gcc -Wall -g foo.c
    $ gdb -q ./a.out
    Reading symbols from ./a.out...done.
    (gdb) run
    Starting program: a.out
    ^C
    Program received signal SIGINT, Interrupt.
    0x000000000040075b in main () at...
  11. Yeah, you need to show your edits.

    Yeah, you need to show your edits.
  12. > void main() main returns an int. >...

    > void main()
    main returns an int.

    > if(Change < '0')
    You probably want to remove the single quotes from every one of your comparisons.

    '0' == 48 (in ASCII)

    So yeah, it's a valid test, but...
  13. Replies
    6
    Views
    212

    Can you describe in words what reall is supposed...

    Can you describe in words what reall is supposed to do?

    Is it supposed to be like 'copy' but for matrices with different sizes?
  14. Replies
    2
    Views
    107

    So 10 hours before this, you only had 30...

    So 10 hours before this, you only had 30 minutes...
    Can anyone do this program for me in the next 30 minutes?

    If you want help, you NEED to make an effort.
    You're not going to get code on a...
  15. Procrastination - Wikipedia...

    Procrastination - Wikipedia
    and
    Hail Mary pass - Wikipedia
  16. What is the scope and lifetime of myobj ? If...

    What is the scope and lifetime of myobj ?

    If you're doing this


    MyClass *obj = new MyClass;
    std::thread t(&MyClass::MyMethod, myobj);

    and MyMethod has the ability to do say delete this; as...
  17. Replies
    12
    Views
    271

    Looks good so far with the enum. In main, you...

    Looks good so far with the enum.

    In main, you need to call the function with a value.


    int main () {
    int a;

    printf("Welcome player. Please enter your class type:");
    ...
  18. Replies
    1
    Views
    145

    The %s format only reads printable characters. ...

    The %s format only reads printable characters. It ignores all white space, and that includes new lines.

    To read an actual line, spaces and a newline at the end, use the fgets function.

    As in...
  19. Replies
    10
    Views
    257

    Also here -> Compiling project in c/c++ - Missing...

    Also here -> Compiling project in c/c++ - Missing ste - C++ Forum
  20. Replies
    12
    Views
    271

    Your player info is all wrong. typedef enum...

    Your player info is all wrong.


    typedef enum { mage, warrior, healer } role;
    typedef struct {
    role role;
    char name[20];
    int level;
    } player;
  21. Replies
    2
    Views
    121

    It's an impressive rewrite in about an hour,...

    It's an impressive rewrite in about an hour, since it was only 2 hours ago you were begging for code.
    Need help with this code



    void init_deck(struct card *deck)
    {
    /* If the deck does...
  22. Replies
    6
    Views
    200

    > I compelete like 70% from the code .. I'd give...

    > I compelete like 70% from the code ..
    I'd give it 30% finished.

    You've made a reasonable job of shuffle.

    The next task would be a function called 'deal'.
    One thing you need to keep track of...
  23. Replies
    5
    Views
    215

    > I'm sorry but I just cannot seem to find the...

    > I'm sorry but I just cannot seem to find the error.
    You count each opening brace, and each closing brace.
    When one isn't in a place you expect, you've found a problem.

    You can do yourself a...
  24. Replies
    5
    Views
    215

    Well sloppy indentation means you lose track of...

    Well sloppy indentation means you lose track of where all the open / close braces are supposed to go.

    Your 'main' really ends at line 126.
    Figure out where your braces should be.

    ...
  25. Replies
    4
    Views
    151

    Is the ":" a useful delimiter? If so, strchr()...

    Is the ":" a useful delimiter?

    If so, strchr() is your friend.
Results 1 to 25 of 497
Page 1 of 20 1 2 3 4