Search:

Type: Posts; User: stahta01

Page 1 of 20 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    5
    Views
    139

    The next thing to try would be commenting out...

    The next thing to try would be commenting out this line


    TMR0 = 0;

    In the interrupt tc_int.

    Been over 10 years since I did PIC programming.

    Tim S.
  2. Replies
    5
    Views
    139

    Looking at your code; I question this line. ...

    Looking at your code; I question this line.



    S=0;


    Would not
  3. Replies
    5
    Views
    139

    Looks like Microchip C code; no idea which MCU. ...

    Looks like Microchip C code; no idea which MCU.

    Tim S.
  4. It should be okay; unless you have a real old...

    It should be okay; unless you have a real old compiler!
    If you got a warning about shadowing you do have that problem.

    Tim S.
  5. Sorry, I missed you are passing it in; still...

    Sorry, I missed you are passing it in; still think that


    ptr_arr[0] = '\0';

    defaults to an int array as in the K & R days.

    NOTE: It no longer does that.

    Tim S.
  6. Replies
    8
    Views
    227

    Since you refuse to tell me if you are supposed...

    Since you refuse to tell me if you are supposed to use malloc I give up helping you. But, since I am not that good using malloc I would likely have given up if you said yes.

    Tim S.
  7. Maybe maybe not! As I have already said it is...

    Maybe maybe not! As I have already said it is implementation defined. If a book said that is the way it is always done, throw away that book!
    The CPU and the OS normally defines the way it is done!...
  8. Replies
    8
    Views
    227

    FYI: The use of "conio.h" usually means the...

    FYI: The use of "conio.h" usually means the student is learning from a poor instructor in India.

    Are you supposed to use malloc in this assignment?

    Tim S.
  9. Replies
    8
    Views
    227

    Functions in C - Cprogramming.com...

    Functions in C - Cprogramming.com
  10. What you are asking is implementation defined for...

    What you are asking is implementation defined for the most part.

    Tim S.
  11. Replies
    6
    Views
    209

    Introduction to C - Cprogramming.com...

    Introduction to C - Cprogramming.com

    Post your code! If you have build errors post the errors!

    Tim S.
  12. Replies
    15
    Views
    418

    Find another book because you have no idea what...

    Find another book because you have no idea what you are doing!

    If I tell you to remove the Ace of Spades from a deck?
    What card would you remove?

    Edit: Please do not ever PM again!! If you do...
  13. Replies
    15
    Views
    418

    Casting malloc - Cprogramming.com...

    Casting malloc - Cprogramming.com

    The code is crap; throw it out and start over or use the advise and fix it!

    Asking over and over what is wrong is a waste of time!
  14. Replies
    1
    Views
    218

    Functions in C - Cprogramming.com...

    Functions in C - Cprogramming.com

    You need to learn the difference between build and run-time errors.
    And, when you get an build error post it.

    Tim S.
  15. std::sort - cppreference.com...

    std::sort - cppreference.com
  16. Replies
    8
    Views
    359

    This is wrong! char exitConditon[]={"0"};...

    This is wrong!



    char exitConditon[]={"0"};


    You need an zero terminated character array to use as an C-String!

    "0" is not equal to 0
  17. Replies
    3
    Views
    292

    The second one likely used double instead of...

    The second one likely used double instead of float to store the result.

    Tim S.
  18. Replies
    3
    Views
    322

    Learn the difference between == and = when used...

    Learn the difference between == and = when used in C code.

    Tim S.
  19. Replies
    15
    Views
    519

    Casting malloc - Cprogramming.com...

    Casting malloc - Cprogramming.com

    Edit: And, you are casting it wrong even for C++ in at least two places!

    This below is considered improper; but, will likely work most of the time.

    (char*)...
  20. Replies
    15
    Views
    519

    STOP casting the result of malloc when...

    STOP casting the result of malloc when programming in C.

    If you have a compile error; post the error!!

    Tim S.
  21. Replies
    6
    Views
    419

    You can only "return" a value from a function two...

    You can only "return" a value from a function two ways.
    1. Using a return statement. Can only return a single value (which can be a structure)
    2. Passing the address of where you wish the result...
  22. Replies
    6
    Views
    419

    Your second post to this thread is not visible to...

    Your second post to this thread is not visible to me.
  23. Replies
    6
    Views
    419

    void swap(int a,int b) { int x=a; a =...

    void swap(int a,int b)
    {
    int x=a;
    a = b;
    b = x;
    }


    The above code is wrong; there is a real reason that swap functions use pointers.
  24. void addDataToList(NodeType**, DataType*); Why...

    void addDataToList(NodeType**, DataType*);

    Why does addDataToList not use ListType?

    Does your code even compiler?

    Tim S.
  25. Replies
    10
    Views
    491

    DO NOT TRUST the information on the non-official...

    DO NOT TRUST the information on the non-official c-for-dummies.com website. I wasted two hours because they implied getline was a part of standard C; it is only part of POSIX C.

    The getline()...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4