Search:

Type: Posts; User: Click_here

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    336

    Why haven't you just named the variables...

    Why haven't you just named the variables "guestNumber", "length", "isSmoker", "CreditCardNumber"?

    That way your code will be self documenting.

    If you don't want to do that, at least change...
  2. Replies
    17
    Views
    682

    Thanks Laserlight, I'll snip that section out of...

    Thanks Laserlight, I'll snip that section out of my reply as it might lead to confusion to anyone reading it
  3. I'd suggest that you develop your code on the...

    I'd suggest that you develop your code on the Linux system - It's a good lesson on portability issues with non-standard C language features :)
  4. Replies
    17
    Views
    682

    Changing these to work with negative numbers is...

    Changing these to work with negative numbers is very easy, just one little change

    Look at this line here...

    while (n > 0)
    And then read out what it is doing

    "Do the following while n is...
  5. Replies
    20
    Views
    913

    ...(packetBuffer - '0'); Should be ...

    ...(packetBuffer - '0');

    Should be


    ...(packetBuffer[2] - '0');
  6. Replies
    8
    Views
    600

    Did you know that some people post their...

    Did you know that some people post their assignments on here and try to get other people to do all the work for them?

    I'm sure that is not what your trying to do, so you'll need to ask things more...
  7. Replies
    14
    Views
    1,008

    You need to make and test each part of your code...

    You need to make and test each part of your code bit by bit. If something does not work, you can fix it in isolation.

    If you have a question about any stage you'll need to say what you tried,...
  8. Replies
    12
    Views
    623

    1) Declare a char array 2) Using the function...

    1) Declare a char array
    2) Using the function "sprintf", put the float into a string format and in the char array
    3) Print the char array to the screen

    Here is a quick overview of sprintf and...
  9. Replies
    4
    Views
    497

    This should not be a problem on an Arduino, as it...

    This should not be a problem on an Arduino, as it is not purely C: It implements parts of C++.

    What code are you trying to run?

    What error codes are you getting?
  10. Replies
    3
    Views
    661

    Functions in C - Cprogramming.com...

    Functions in C - Cprogramming.com

    Enjoy :)
  11. Have a look at the "GetConsoleInput" function...

    Have a look at the "GetConsoleInput" function here - Example C Program: Deriving a Session Key from a Password - Win32 apps | Microsoft Docs
  12. Thread: Function

    by Click_here
    Replies
    3
    Views
    715

    This is what I got when I tried to build it... ...

    This is what I got when I tried to build it...


    ||=== Build: Debug in AlgorithmTest (compiler: GNU GCC Compiler) ===|
    D:\Programming\AlgorithmTest\main.c||In function 'main':|...
  13. Replies
    7
    Views
    870

    *Like*

    *Like*
  14. Replies
    12
    Views
    1,216

    If it's my meme collection you are after, you can...

    If it's my meme collection you are after, you can go away :P
  15. Replies
    8
    Views
    702

    lmao!

    lmao!
  16. Replies
    12
    Views
    1,216

    Good point - I didn't think of that My OS does...

    Good point - I didn't think of that

    My OS does not clear the memory before allocating it, so here is the output from when I ran it (in case you are in the same boat as Salem)


    malloc: 0x41...
  17. Replies
    12
    Views
    1,216

    Learn by doing :) int main(void) { ...

    Learn by doing :)




    int main(void)
    {
    int i, setSize = 10;
    char *apple;
  18. Replies
    8
    Views
    702

    Instead of studying the exact implications of...

    Instead of studying the exact implications of doing something incorrectly, my advice would be to focus your energy into ways to avoid doing it in the first place.

    Assigning a literal too large to...
  19. Replies
    7
    Views
    870

    Yes. This is a basic bit test. // A few...

    Yes.

    This is a basic bit test.


    // A few simple bit tasks for u-controllers...

    // Test bit
    (1<<bit) & x
  20. Replies
    14
    Views
    1,122

    Have a look at #include You can...

    Have a look at

    #include <errno.h>

    You can also use a custom typedef to handle error - I like this because it allows me to slowly "throw" the error back to a function that could do something...
  21. There is an example of fgets here - Why it's bad...

    There is an example of fgets here - Why it's bad to use feof() to control a loop - Cprogramming.com
  22. It means that when your user opens your program...

    It means that when your user opens your program the memory is not allocated yet.


    Another way of looking at it is a work project and getting funding for it (where the money represents memory in...
  23. Replies
    3
    Views
    651

    char *filename = malloc(sizeof(name)); How...

    char *filename = malloc(sizeof(name));


    How big do you thing sizeof(name) is going to be? Remember that "name" is not an array in that function, it is a pointer to a char.

    Try running this...
  24. What makes you think that? No one has asked...

    What makes you think that?


    No one has asked this, but what are you intending to program? What environment are you targetting? Did you have a design pattern in mind?
  25. Have you seen "Patterns in C" by Adam Petersen? ...

    Have you seen "Patterns in C" by Adam Petersen?

    And no, I've never had the desire to use C++.

    I have 2 things that I code:
    1) Small 8-bit microcontrollers that have no OS (bare metal...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4