# Search:

Type: Posts; User: thmm

Page 1 of 2 1

## Search: Search took 0.01 seconds.

by thmm
Replies
2
Views
43

### You need to copy the values from arr1 to arr2...

You need to copy the values from arr1 to arr2 only if they are greater than threshold. There is no need to find the min.

Maybe sth. like this:

for (int i = 0; i < length; ++i) {
if...
2. ## Thread: Maximum of the real numbers found into the input

by thmm
Replies
13
Views
307

### You are right. Thanks for pointing it out.

You are right. Thanks for pointing it out.
3. ## Thread: Maximum of the real numbers found into the input

by thmm
Replies
13
Views
307

### Wouldn't it be possible to set the locale to a...

Wouldn't it be possible to set the locale to a country that uses the comma as decimal separator and read the input as a flaot ?
4. ## Thread: Strcmp causes segmentation fault

by thmm
Replies
8
Views
374

### When I ran the code in VS 2019 I got an exception...

When I ran the code in VS 2019 I got an exception at line 85

strcpy(A[index].name, temp.name);
when index was -307.
5. ## Thread: I've been stuck.

by thmm
Replies
6
Views
514

### 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
6. ## Thread: Using mallock in array

by thmm
Replies
5
Views
406

### 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);
7. ## Thread: Need help opening a user provided file

by thmm
Replies
9
Views
550

### 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)
8. ## Thread: Prime factorization of a number

by thmm
Replies
8
Views
434

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

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

void print_prime_factors(int num)
{
printf("The prime...
9. ## Thread: I can't spot my mistake...

by thmm
Replies
213
Views
9,950

### 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|
10. ## Thread: I can't spot my mistake...

by thmm
Replies
213
Views
9,950

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

It has nothing to do with MS. Neither MinGW nor cygwin have these
11. ## Thread: I can't spot my mistake...

by thmm
Replies
213
Views
9,950

### 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 ?
12. ## Thread: I can't spot my mistake...

by thmm
Replies
213
Views
9,950

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

5. People might had an interest but couldn't build it Windows(possible)
13. ## Thread: How exactly do i "create" a binary file to check if my program works?

by thmm
Replies
6
Views
420

### 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:
2. define the expected output
3. get the actual output
4. check...
14. ## Thread: Database project to practice pointers

by thmm
Replies
6
Views
485

### 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...

by thmm
Replies
12
Views
668

### Maybe like this: #include #include...

Maybe like this:

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

int roll()
{
int dice;
16. ## Thread: Another program (try)

by thmm
Replies
10
Views
608

### 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.
...

by thmm
Replies
4
Views
1,265

### 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
...
18. ## Thread: I can't compile and put it as a variable and matrix

by thmm
Replies
5
Views
489

### 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...
19. ## Thread: I can't spot my mistake...

by thmm
Replies
213
Views
9,950

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

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

by thmm
Replies
8
Views
535

### 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
21. ## Thread: I can't do the commands

by thmm
Replies
3
Views
388

### 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.
22. ## Thread: I can't spot my mistake...

by thmm
Replies
213
Views
9,950

### 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,...
23. ## Thread: Array with different data types

by thmm
Replies
5
Views
394

### 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.
24. ## Thread: I can't spot my mistake...

by thmm
Replies
213
Views
9,950

### 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.
25. ## Thread: I can't spot my mistake...

by thmm
Replies
213
Views
9,950

### Thanks I will have a look later.

Thanks I will have a look later.
Results 1 to 25 of 41
Page 1 of 2 1