Search:

Type: Posts; User: G4143

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    13
    Views
    1,885

    Got the same solution as you when I re-wrote the...

    Got the same solution as you when I re-wrote the code...Must have been a typo..I'll send it to you anyway.
  2. Replies
    13
    Views
    1,885

    I'm wondering if anyone tried to write a solution...

    I'm wondering if anyone tried to write a solution for this puzzle? Is it solvable with the given wheels?

    I tried writing a brute-force solution and it could match right up to the last wheel where...
  3. Replies
    13
    Views
    1,885

    Interesting problem... Thanks for posting it.

    Interesting problem... Thanks for posting it.
  4. Replies
    3
    Views
    469

    Could you use valgrind to verify this? ...

    Could you use valgrind to verify this?

    Valgrind Home
  5. Replies
    7
    Views
    1,008

    Are you considering the newline character?

    Are you considering the newline character?
  6. Replies
    2
    Views
    987

    Well I'm willing to learn and use the applicable...

    Well I'm willing to learn and use the applicable opcodes to program a micro-controller if my C skills are lacking.
  7. Replies
    2
    Views
    987

    Free Online MicroController Simulator

    I'm looking for a free online microcontroller simulator to introduce myself to programming the microcontroller in C(it doesn't have to be C but it would be nice).

    A few things to note:
    1. I'm not...
  8. Didn't know that! Thanks for pointing that out.

    Didn't know that! Thanks for pointing that out.
  9. Well number 1: char word[13] = {'h', 'i',...

    Well number 1:


    char word[13] = {'h', 'i', 'd', 'd', 'e', 'n', 's', 't', 'r', 'i', 'n', 'g'};

    Do you really want to take the strlen of word?
  10. Replies
    4
    Views
    879

    It could be that you are trying to take the...

    It could be that you are trying to take the address of a key word and the compiler is looking for an expression that it can take the address of.

    Address-of operator: & | Microsoft Docs

    From the...
  11. Poll: The first thing to do when you join a public...

    The first thing to do when you join a public forum...

    1.. Grow a thick skin.
  12. I have a simple rule(reminder) when I start...

    I have a simple rule(reminder) when I start considering dynamic allocation: Never use dynamic allocation unless you absolutely have to.
  13. Thread: ASCII and EBCDIC

    by G4143
    Replies
    8
    Views
    1,299

    A little off topic.. I remember back in the days...

    A little off topic.. I remember back in the days when you had to have a ASCII text editor to write code in C. I guess with the proliferation of multi-byte characters and unicode character sets that...
  14. Thread: ASCII and EBCDIC

    by G4143
    Replies
    8
    Views
    1,299

    I just used EBCDIC as an example of characters...

    I just used EBCDIC as an example of characters which differed from ASCII to help with my example. I'm trying to get into a C frame of mind when I sit down and code, basically I'm trying to understand...
  15. Thread: ASCII and EBCDIC

    by G4143
    Replies
    8
    Views
    1,299

    ASCII and EBCDIC

    I'd love to make a program which takes certain characters(a-z,A-Z,0-9) and map them to int values but I'm unsure of how to make that portable and correct.

    The problem comes from investigating the...
  16. Replies
    6
    Views
    1,478

    Segmentation fault is caused when you try to...

    Segmentation fault is caused when you try to deference invalid memory in your program.



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

    int main(int argc, char ** argv) {
    ...
  17. Replies
    1
    Views
    729

    Validating memory pointers

    I saw a video today on validating memory pointers and thought it was interesting enough to post about it...

    The basic idea was that fopen checked that its passed filename was valid addressable...
  18. Thread: Closures in C

    by G4143
    Replies
    2
    Views
    1,228

    I guess I'm close to the mark.. quoted from wiki

    I guess I'm close to the mark.. quoted from wiki
  19. Thread: Closures in C

    by G4143
    Replies
    2
    Views
    1,228

    Closures in C

    I tried creating closures in C and I want to know how close to the mark I am.

    First a few notes about what I did.

    1. I used an example which hard coded the types for simplicity. I think you...
  20. Replies
    9
    Views
    1,228

    No... You are welcome.

    No... You are welcome.
  21. You must check if head is NULL in your ADD...

    You must check if head is NULL in your ADD function.

    Something like below:


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

    void check_allocation(void *ptr) {
    if (!ptr) {
  22. Replies
    3
    Views
    827

    Then that really swings the door wide open for a...

    Then that really swings the door wide open for a whole lot of preprocessor possibilities.
  23. Replies
    3
    Views
    827

    Passing types to the preprocessor.

    Is it possible to pass types to a macro? Can I pass types like int, char, long to a macro and have them expanded into C source code that include the passed types?
  24. Replies
    5
    Views
    1,234

    You should also mention that the C compiler has...

    You should also mention that the C compiler has plenty of flags that can set to detect many, many, many errors. Here's an example of some of the more common ones.


    gcc -Wall -pedantic -Werror ...
  25. Replies
    5
    Views
    1,234

    Shouldn't you be using a newline or flushing the...

    Shouldn't you be using a newline or flushing the stdout buffer here:


    printf("freed memory");

    i.e:


    printf("freed memory\n");//added newline
Results 1 to 25 of 65
Page 1 of 3 1 2 3