Search:

Type: Posts; User: elementary_peng

Search: Search took 0.01 seconds.

  1. Aha, so its only the definitions in .h files that...

    Aha, so its only the definitions in .h files that are "exposed" to main.c?
    Actually, that makes a lot of sense because I wanted to remove direct access to the structs members directly... Using an...
  2. Dereferencing pointer to incomplete type

    Just trying to figure out why I would need to define struct point a second time in main.c in order to remove the dereferencing pointer to incomplete type error I am having in main.c?

    Am I tackling...
  3. Replies
    19
    Views
    2,247

    But check out what Arduino is doing to your code,...

    But check out what Arduino is doing to your code, it translates it to this:

    #include <Arduino.h>


    // Declared weak in Arduino.h to allow user redefinitions.
    int atexit(void (* /*func*/ )()) {...
  4. Replies
    3
    Views
    541

    I think checking if turno!='g' in the second...

    I think checking if
    turno!='g' in the second scanf block is redundant since there is no way the code can reach that point if indeed turno is 'g'.
  5. Replies
    19
    Views
    2,247

    I seen something like this in Advanced Linux...

    I seen something like this in Advanced Linux Programming Book . It recommends not to modify environ directly (you haven't) but use setenv and unsetenv functions instead, think the reasons are pretty...
  6. Replies
    19
    Views
    2,247

    Yeah I never use it, I just seen it in some book...

    Yeah I never use it, I just seen it in some book I was glancing over and thought it was interesting.
  7. Replies
    19
    Views
    2,247

    There is actually another paramater you can stick...

    There is actually another paramater you can stick into int main()...
    Atleast this works on Linux not sure about other systems...



    #include <stdio.h>
  8. Replies
    2
    Views
    512

    Yeah I got a bit side tracked playing with...

    Yeah I got a bit side tracked playing with pointers, it's a ridiculous concept reassigning a const! :redface: thats what variables are for :D
  9. Replies
    2
    Views
    512

    Behaviour of static and pointers

    Ok so I'm playing around learning about pointers and came across something a bit head scratchy with the static keyword...



    int main(int argc, char* argv[]){
    int *ip;
    static const int FIVE;
    ...
Results 1 to 9 of 9