# Search:

Type: Posts; User: john.c

Page 1 of 20 1

## Search: Search took 0.01 seconds; generated 12 minute(s) ago.

by john.c
Replies
5
Views
153

### If that's true then why did you show something...

If that's true then why did you show something different?
2. ## Thread: Removing ribbon above display area

by john.c
Replies
37
Views
618

### I doubt that very much. You are clearly a...

I doubt that very much. You are clearly a braindead moron. :cool:
3. ## Thread: Should i use for loop on this? sorry im a beginner

by john.c
Replies
12
Views
314

### x is supposed to be an integer, and presumably...

x is supposed to be an integer, and presumably positive even though it doesn't specify.
4. ## Thread: Should i use for loop on this? sorry im a beginner

by john.c
Replies
12
Views
314

### What are you babbling about? Don't tell people...

What are you babbling about? Don't tell people what they can and can't do. You're just a guest here.

(BTW, the "Reply With Quote" button worked this time, but it sometimes doesn't.)
5. ## Thread: Should i use for loop on this? sorry im a beginner

by john.c
Replies
12
Views
314

### It seems well-defined to me, although (x - (x -...

It seems well-defined to me, although (x - (x - 1)) is a strange way to write 1. And the answer for x=5 is not 13.333334 but 13.3333333... (so no possibility of rounding up to a 4, really).

This...
6. ## Thread: Playing with random numbers

by john.c
Replies
11
Views
180

### This sounds totally idiotic. You really don't...

This sounds totally idiotic.
You really don't seem to know what you're talking about (and I know assembly quite well).
Forget I said anything.
7. ## Thread: Playing with random numbers

by john.c
Replies
11
Views
180

### Maybe you meant something more like this. ...

Maybe you meant something more like this.

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

int main() {
8. ## Thread: single for loop --- two conditions??

by john.c
Replies
3
Views
173

### It can't be written as nested loops without...

It can't be written as nested loops without totally changing what it does.
It is by nature a single-dimensional loop.
Why do you think you want a double loop?
9. ## Thread: global variable question?

by john.c
Replies
9
Views
258

### WTF? I didn't realize you had a learning...

WTF?
I didn't realize you had a learning disability.
10. ## Thread: global variable question?

by john.c
Replies
9
Views
258

### Nope. A "global" is a variable that is accessible...

Nope. A "global" is a variable that is accessible throughout the program, in all translation units. Although a global never gets "destroyed" until the program ends (when else would it possibly be...
11. ## Thread: #ifndef is not working as expected.

by john.c
Replies
15
Views
411

### What a moron.

What a moron.
12. ## Thread: #ifndef is not working as expected.

by john.c
Replies
15
Views
411

### Your quest is pointless. You are an idiot....

You are an idiot.
Those are the facts.
13. ## Thread: #ifndef is not working as expected.

by john.c
Replies
15
Views
411

### This is pointless.

This is pointless.
14. ## Thread: Building program with shared library

by john.c
Replies
4
Views
218

### The problem is that you make wrapLibraryFunc...

The problem is that you make wrapLibraryFunc static in the header file.
This causes it to not be seen outside of it's translation unit.
Get rid of the static.
15. ## Thread: MSVSC++ program works incorrectly when inline function optimization is turned on.

by john.c
Replies
3
Views
593

### You are probably stepping on memory you shouldn't...

You are probably stepping on memory you shouldn't somewhere.
The different memory layouts of debug and release mode with or without inlining is what is causing the different behavior.
Have you...
16. ## Thread: Graph data structure

by john.c
Replies
4
Views
333

### All of your return paths return 1. Presumably...

All of your return paths return 1.
Presumably the last one should return 0. :)

by john.c
Replies
2
Views
259

### You need to compile with full warnings and fix...

You need to compile with full warnings and fix all of them. Here are a couple of mistakes:

if (error = mkfifo(fifo , 0666) == -1) {
...
18. ## Thread: Graph data structure

by john.c
Replies
4
Views
333

### You aren't allocating any memory for the visited...

You aren't allocating any memory for the visited array.
19. ## Thread: Weird endianness related bug

by john.c
Replies
3
Views
312

### Nothing is happening. Your machine (our common...

Nothing is happening.
Your machine (our common Intel/AMD machines) are little endian.
So the value 0xd8754a52 is stored in memory with the "little end" (least significant byte) "first" (lowest) in...
20. ## Thread: C++17, VS 2019: scoped_lock mutex bug or error on my part?

by john.c
Replies
3
Views
528

### "Conversion loses qualifiers" suggests that the...

"Conversion loses qualifiers" suggests that the "const" is causing the difference.
21. ## Thread: Who can check my code?

by john.c
Replies
3
Views
508

### Well, "triangle" has an 'n' in it. And you...

Well, "triangle" has an 'n' in it.
And you aren't storing "points" but side lengths.
Also, the exercise says to pass a triangle to the function, not it's separate side lengths.
22. ## Thread: Delete Data from a struct

by john.c
Replies
2
Views
300

### Maybe something like this. I couldn't test it...

Maybe something like this. I couldn't test it since you didn't give me a full program. I'm assuming "index_stock" is what might better be called stock_size, the current number of active elements in...
23. ## Thread: count signs in .txt file bug?

by john.c
Replies
8
Views
347

### That's the difference between "text" and "binary"...

That's the difference between "text" and "binary" modes in both C and C++.
In text mode, the '\r' chars are removed.
In binary mode they aren't.
The OP's problem counting newlines had to do with...
24. ## Thread: count signs in .txt file bug?

by john.c
Replies
8
Views
347

### No, '\n' is not "twice as large". The problem is...

No, '\n' is not "twice as large".
The problem is that you are reading a file with Windows line endings ('\r' '\n') in text mode, so your fread will never see the '\r' characters.
However, the fseek...
25. ## Thread: Is there a way to determine string width (not string length)?

by john.c
Replies
5
Views
324

### GetTextMetrics...

GetTextMetrics has nothing to do with C++. It's a Windows API function that would appear to do what you want. Is your program a Windows GUI program?
Results 1 to 25 of 499
Page 1 of 20 1