Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.20 seconds.

  1. Replies
    2
    Views
    59

    So, while you're copy/pasting your way to 600+...

    So, while you're copy/pasting your way to 600+ lines, I made a sampler.


    #include <iostream>
    #include <iomanip>
    using namespace std;

    class Board {
    private:
    char board[3][3][3];
  2. Replies
    1
    Views
    64

    First, fix these. foo.cpp: In function ‘int...

    First, fix these.


    foo.cpp: In function ‘int LauraAI()’:
    foo.cpp:20:66: error: ‘printf’ was not declared in this scope
    printf ("\nLaura-AI chose board %d to play in\n", BoardChoice);
    ...
  3. Replies
    6
    Views
    89

    Nothing you have in main at the moment can...

    Nothing you have in main at the moment can correctly call checkSizesLast() with any amount of casting or dereferencing.

    checkSizesLast is expecting an array (of some dimensions) who's most basic...
  4. Replies
    1
    Views
    109

    > i tried to redirect STDOUT to the socket but I...

    > i tried to redirect STDOUT to the socket but I didn't get what I need
    Post your example of what didn't work.
  5. Replies
    13
    Views
    193

    > Your instructor is wrong. However, you probably...

    > Your instructor is wrong. However, you probably should do things the way he wants anyway.
    Or send the instructor here for better education, or just forward them the message threads.
  6. Replies
    13
    Views
    193

    A stack is a LIFO (Last In, First Out) data...

    A stack is a LIFO (Last In, First Out) data structure.
    That is, you 'push' and 'pop' from just one end.

    A queue on the other hand is a FIFO (First In, First Out) data structure.
    You 'push' on...
  7. Replies
    5
    Views
    103

    Why are you basing your rng() on time() and...

    Why are you basing your rng() on time() and clock().

    Which, depending on how often you call them, return
    - the same as last time
    - +1 from last time
    - always some number greater than last time....
  8. Replies
    8
    Views
    125

    You need to show us your StrStackPush() and how...

    You need to show us your StrStackPush() and how you call it.

    Because if you don't know where your strings are, chances are - you're doing it wrong.
  9. Replies
    6
    Views
    152

    #include int main(void) { // start...

    #include <stdio.h>
    int main(void)
    { // start scope1
    int i = 2; // i begins at this ;
    for (int j = 0;/* j begins at this ;*/ j < 5; ++j)
    { //start scope2
    // j can be only...
  10. Replies
    17
    Views
    351

    > If I have a list of 1 ,2, 3, 8, 9, 9, 21, 31,...

    > If I have a list of 1 ,2, 3, 8, 9, 9, 21, 31, 45, 71 and 124, I would get a price 868, but the correct answer is 849. It must be a different principle.
    Maybe you're allowed to rearrange the...
  11. Replies
    1
    Views
    96

    There are several problems. 1. Your code looks...

    There are several problems.

    1. Your code looks like dog-food. The indentation is awful, and probably hiding your mistakes.



    #include <unistd.h>
    #include <stdio.h>
    #include <string.h>...
  12. Replies
    7
    Views
    147

    Hence gcc has a specific warning to detect these...

    Hence gcc has a specific warning to detect these kinds of feature abuse.


    $ gcc -Wshadow foo.c
    foo.c: In function ‘main’:
    foo.c:8:9: warning: declaration of ‘a’ shadows a global declaration...
  13. Replies
    6
    Views
    199

    Use sscanf() or strtol() on your input string.

    Use sscanf() or strtol() on your input string.
  14. difference between Inheritance and polymorphism -...

    difference between Inheritance and polymorphism - Google Search
  15. Replies
    1
    Views
    93

    The whole point of a doubly linked list is to...

    The whole point of a doubly linked list is to avoid the nonsense of list reversal.

    If you want to traverse it backwards, you just start at tail, and follow all the node->prev until you get to NULL.
  16. Replies
    13
    Views
    223

    Between the and [next] activity, you put a...

    Between the <> and [next] activity, you put a [work] activity box.

    Work being whatever it is you want to do with a node in your list.
  17. Replies
    17
    Views
    351

    Are you suggesting there is a different price to...

    Are you suggesting there is a different price to pay if the log is cut in the order 4, 7, 6, 3 compared to say 7, 4, 6, 3
  18. Replies
    13
    Views
    223

    Your true loop needs to end up pointing back at...

    Your true loop needs to end up pointing back at the <>

    You've got it pointing back at "set pointer to the head of the list".
  19. Replies
    13
    Views
    278

    Like this. #include #include...

    Like this.


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

    int main(int argc, char *argv[])
    {
    char buff[100];
  20. Replies
    13
    Views
    223

    No it's not right at all. False EXITS the...

    No it's not right at all.

    False EXITS the loop.
    True does some work, does node = node->next and jumps back to the test.
  21. /me checks out elon's apparent "birthday" on the...

    /me checks out elon's apparent "birthday" on the mod page and laughs....

    Why do I get the feeling the person who really wants to learn C is you?
  22. Replies
    2
    Views
    96

    Break the problem down into simpler achievable...

    Break the problem down into simpler achievable steps.

    This is your first program.


    int main ( ) {
    char buff[100];
    while(fgets(buff,sizeof(buff),stdin)) {
    printf("%s",buff);...
  23. Replies
    13
    Views
    223

    You have a backward pointing arrow to make a...

    You have a backward pointing arrow to make a loop.
    You have a "False" coming out of your <> diamond to get out of that loop.
  24. Replies
    13
    Views
    278

    Well your first problem would be that '2' != 2 ...

    Well your first problem would be that '2' != 2

    You need to convert your character representation into its numeric representation.
  25. Replies
    13
    Views
    223

    > How to make flow chart for this operation ...

    > How to make flow chart for this operation
    What operation?

    How to create it?
    How to traverse it?
    How to delete it?

    Make a flow chart of this
    while ( node != NULL ) node = node->next;
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4