Search:

Type: Posts; User: ch4

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,474

    Do you mean i have to declare X Y in a different...

    Do you mean i have to declare X Y in a different way like the above ?



    struct data {
    int size;
    int X<>;
    int Y<>;
    float r;
    };
  2. Replies
    3
    Views
    1,474

    Rpc linux c, dynamic array

    Hello,

    I'm writing an RPC C program in LInux and i want to pass dynamically allocated arrays, but only the first element of the arrays is reachable at the server side.


    struct data {
    int...
  3. Replies
    4
    Views
    4,518

    ok, i see. Thanks

    ok, i see.
    Thanks
  4. Replies
    4
    Views
    4,518

    But function is already friend.

    But function is already friend.
  5. Replies
    4
    Views
    4,518

    Access Inner's class member

    Hello fellows,

    I want to access protected member of inner class from within friend function of the outer class, without adding getter to inner class. Is that possible ? Any advice ?


    ...
  6. Replies
    11
    Views
    6,940

    It may be my confusion for years. I believed the...

    It may be my confusion for years. I believed the exact opposite. That is, i have to use underscore in front of, so as to avoid collision with reserved definitions. Thanks for the correct reminding.
    ...
  7. Replies
    11
    Views
    6,940

    But i have to admit that the compilation errors...

    But i have to admit that the compilation errors have lead me to another direction.
  8. Replies
    11
    Views
    6,940

    I have just found the solution. The ostream...

    I have just found the solution.

    The ostream couldn't find the way to print string. I've just included <string> and it does compile finally.

    I've removed const from player and then the error...
  9. Replies
    11
    Views
    6,940

    Thanks for the advices lasrlight. This code is...

    Thanks for the advices lasrlight.
    This code is not for bussiness. I was just helping someone and, while i was so sure that it does compile, i was surprised.

    The above is the minimal which is not...
  10. Replies
    11
    Views
    6,940

    Check attachements. 2 headers (one with the...

    Check attachements.

    2 headers (one with the problematic code)
    1 cpp with main.

    This minimal edition compiles and run on g++ (linux).

    I've tried on two different machines with VS 2015...
  11. Replies
    11
    Views
    6,940

    Yes, i do have code to test this function. Yes,...

    Yes, i do have code to test this function.
    Yes, i do have main.
    No i don't instantiate object of Player. Instead, i do instantiate subclasses of Player (such as GreedyPlayer) which are not abstract...
  12. Replies
    11
    Views
    6,940

    Error only on Visual Studio

    Hello fellows.
    I have tested the above code to g++ and it's ok. It does compile.


    class Player {
    private:
    string name;
    public:
    Player(const string &n)
    {
  13. Replies
    7
    Views
    7,793

    Sorting col_data by id would be cool. Otherwise,...

    Sorting col_data by id would be cool.
    Otherwise, searching for indexes in a meshed up col_data will lead to two nested loops.

    //Edit

    Thinking again, would you mind giving us more info about...
  14. That's why we don't have to care about the value...

    That's why we don't have to care about the value of NULL. Just use it as "NULL" Simple as pie.
    In reality i don't know if NULL is being used for other purposes except pointers. Not sure.
  15. NULL - C++ Reference...

    NULL - C++ Reference
    http://tigcc.ticalc.org/doc/alloc.html#NULL
  16. Replies
    7
    Views
    1,899

    I don't know why you're back still wondering...

    I don't know why you're back still wondering which programming language to choose. It seems that your thoughts drop you into endless loops such as while(1).
    So write a break; statement and pick C.
  17. Some advices without testing your code. 1. Do...

    Some advices without testing your code.
    1. Do not hijack the code with comments
    2. Use curly brackets to if-else statements. Only identation doesn't work. if/else without curly brackets nests a...
  18. 1. Here's the deal. As you propably know all...

    1. Here's the deal. As you propably know all pointers pointing somewhere in memory that's why are holding mysterious numbers. If you need a pointer to point to nowhere or you want to initialize it or...
  19. Thread: strcmp()

    by ch4
    Replies
    26
    Views
    3,728

    verifica it's a character, not an array of...

    verifica it's a character, not an array of characters.
    Try char verifica[200]; and check again arguments of strcmp.
  20. Replies
    9
    Views
    2,406

    The very fisrt step before add a node is to...

    The very fisrt step before add a node is to initialize the head/last pointers to NULL propably into main.
    Decide the way new items should be inserted to list. (Let's say at the end)
    In the...
  21. Replies
    9
    Views
    2,406

    Fix add function. Get a papper, draw (just some...

    Fix add function.
    Get a papper, draw (just some cubes + pseudoalgorithm) the list according to your add function and see what's going on.
    Then draw on papper the appropriate way.
  22. Replies
    7
    Views
    1,401

    1. You should name your variables in more...

    1. You should name your variables in more explainable way. (b,d = ???)
    2. one is pointer to pointer. one[0] is pointing to pointer. If one[0] isn't null (0) then has as value a memory address that's...
  23. Replies
    14
    Views
    2,117

    So, post your new version.

    So, post your new version.
  24. Replies
    14
    Views
    2,117

    Go to line 20 and remove semicolon. Placing...

    Go to line 20 and remove semicolon.
    Placing semicolon right after while(),means that loop and do nothing.

    I haven't read the rest but you may have issues when reading chars instead of ints. (line...
  25. Replies
    3
    Views
    2,424

    scanf is not working this way. Read more here...

    scanf is not working this way. Read more here.
    scanf differs from printf. Provide as argument a pointer to your variable (in reality address space). In you case &num1.

    scanf("%d", &num1);

    If...
Results 1 to 25 of 158
Page 1 of 7 1 2 3 4