Search:

Type: Posts; User: thmm

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: I've been stuck.

    by thmm
    Replies
    6
    Views
    308

    Have a look at this tutorial. It uses an int for...

    Have a look at this tutorial. It uses an int for the data but you could modify to use strings.
    Given a linked list which is sorted, how will you insert in sorted way - GeeksforGeeks
  2. Replies
    5
    Views
    203

    Why not follow the KISS priciple? #define...

    Why not follow the KISS priciple?



    #define NAME_LEN 100
    char first_name[NAME_LEN];
    scanf("%99s", first_name);
  3. Replies
    9
    Views
    278

    Consider sth. like this: bool import(bool...

    Consider sth. like this:


    bool import(bool provided)
    {
    char file_name[256] = { 0 };
    FILE* src = NULL;


    if (provided)
  4. Replies
    8
    Views
    313

    Not sure if you have learned about functions yet,...

    Not sure if you have learned about functions yet, but they would make your task easier:


    #include <stdio.h>
    #include <stdbool.h>


    void print_prime_factors(int num)
    {
    printf("The prime...
  5. Replies
    213
    Views
    8,020

    Still no luck with MinGW:...

    Still no luck with MinGW:
    Alu_demo\alu\_.h|4|fatal error: unic/limits.h: No such file or directory|
  6. Replies
    213
    Views
    8,020

    It has nothing to do with MS. Neither MinGW nor...

    It has nothing to do with MS. Neither MinGW nor cygwin have these
  7. Replies
    213
    Views
    8,020

    Is it really necessary to use non-standard...

    Is it really necessary to use non-standard headers like uchar.h and non-standard types like ssize_t ?
  8. Replies
    213
    Views
    8,020

    5. People might had an interest but couldn't...

    5. People might had an interest but couldn't build it Windows(possible)
  9. If you want to do some automated testing - and at...

    If you want to do some automated testing - and at some point you need to learn it - you follow this pattern:
    1. define your input
    2. define the expected output
    3. get the actual output
    4. check...
  10. Replies
    6
    Views
    339

    Wheb hamster_nz spoke about heaps he porbbly...

    Wheb hamster_nz spoke about heaps he porbbly meant the data structure, not the place where malloc allocates the memory.
    Heap Data Structure - GeeksforGeeks

    I am not sure if a text file is the...
  11. Thread: Dice

    by thmm
    Replies
    12
    Views
    456

    Maybe like this: #include #include...

    Maybe like this:

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


    int roll()
    {
    int dice;
  12. Replies
    10
    Views
    444

    printf("%.2f", double i, rel(double i)); When...

    printf("%.2f", double i, rel(double i));
    When passing an argument to a function you don't pass the type, only the name. Also when you pass 2 parameters to printf you need 2 format specifiers.
    ...
  13. Replies
    4
    Views
    968

    Let me try to explain in simple words: 1....

    Let me try to explain in simple words:


    1. open a stream for reading
    2. open a stream for output
    while reading a line from input
    if line doesn't start with <settings> then
    ...
  14. I would suggest that you start learning the...

    I would suggest that you start learning the syntax of the C language first.
    There are plenty of free tutorials online. Alternatively you could get a book.
    A few were recommended to you in a...
  15. Replies
    213
    Views
    8,020

    What browser do you use? This site doesn't work...

    What browser do you use?
    This site doesn't work properly on Firefox.
  16. Thread: Simple program

    by thmm
    Replies
    8
    Views
    370

    You need to use a for loop to print your stars....

    You need to use a for loop to print your stars.
    for loop in C - Tutorialspoint
  17. Replies
    3
    Views
    279

    internal, item and cash are not valid C keywords....

    internal, item and cash are not valid C keywords.
    In scanf you shouldn't have a space between % and d
    You need to implement the functionality of the menu items.
  18. Replies
    213
    Views
    8,020

    Seems not many people interested here. Why don't...

    Seems not many people interested here. Why don't you try your luck in another forum:
    UNIX/Linux Programming - C++ Forum
    or
    C and C++ Forum | Dream.In.Code

    BTW. Your code calls many functions,...
  19. Replies
    5
    Views
    262

    In an array all values must have the same type....

    In an array all values must have the same type.
    You could create an array of uint32_t and store uint32_t in it.
  20. Replies
    213
    Views
    8,020

    I would check if *_tmp is != NULL, or would that...

    I would check if *_tmp is != NULL, or would that be ok?
    A few posts before you mentioned a segfault and a null ptr is a common cause for one.
  21. Replies
    213
    Views
    8,020

    Thanks I will have a look later.

    Thanks I will have a look later.
  22. 1.) In older versions of C you had to declare the...

    1.) In older versions of C you had to declare the vars at the top of a function. Your VS 2010 doesn't support modern C.
    Code::Blocks uses GCC which is more modern.

    2.) These is just the...
  23. Replies
    213
    Views
    8,020

    I don't see a need for that. I am just a hobbyist...

    I don't see a need for that. I am just a hobbyist without higher ambitions.
  24. Replies
    213
    Views
    8,020

    It's not the code itself(which is readable), but...

    It's not the code itself(which is readable), but what it is doing. I know very little about the CPU.
  25. What's the purpose of this - homework? C++ comes...

    What's the purpose of this - homework?
    C++ comes with std::list and std::forward_list, why not using these?
    Are you aware that lists have a poor performance and should rarely be used?
Results 1 to 25 of 37
Page 1 of 2 1 2