> Can anyone let me know what these codes mean
You mean like the presenter of the YT video you watched?
In amongst the "ums" and "ahs" and the terrible typing, they should have been explaining...
Type: Posts; User: Salem
> Can anyone let me know what these codes mean
You mean like the presenter of the YT video you watched?
In amongst the "ums" and "ahs" and the terrible typing, they should have been explaining...
What do you think 'jmp int_bottom' does?
They're assembler macros.
.macro HandleException num
.global _ZN16InterruptManager19HandleException\num\()Ev
_ZN16InterruptManager19HandleException\num\()Ev:
movb $\num, (interruptnumber)...
&CD3DX12_HEAP_PROPERTIES(D3D12_HEAP_TYPE_DEFAULT) creates a temporary object.
The main problem with these is you've got no control over the lifetime of the temporary, which is why it now...
They are respectively the copy constructor and assignment operator.
14.14 — Introduction to the copy constructor – Learn C++
22.3 — Move constructors and move assignment – Learn C++
21.12 —...
GdkPixbuf.Pixbuf.new_from_bytes
You need to filter your png files through say imagemagik to get just the raw RGB data.
A close example:
imagemagick convert png 16 bit to raw - Stack Overflow
...
Try
all: main test_segment
test_segment: test_segment.c segment.c
gcc -Wall -o test_segment test_segment.c segment.c
main : main.c segment.c
gcc -Wall -o main main.c segment.c
> so basically the function in "segment.h" is not found
It was found, otherwise you would have gotten a different error message.
Your error is from the linker, not the compiler.
segment.h...
I expect there is some collusion between the compiler and assembler that automatically infers certain operations when compiling 64-bit code.
> printf("Location: %lu\n", (argv[1], "#"));
What!?
$ gcc -Wall bar.c
bar.c: In function ‘main’:
bar.c:6:39: warning: left-hand operand of comma expression has no effect [-Wunused-value]
...
Even though it's apparently only loading the lower 32-bits using edi, it does seem like it does get sign-extended to 64-bits.
Breakpoint 1, main () at bar.c:13
13 char *name =...
> warning: Memory pointed to by 'name' is freed twice. [doubleFree]
You could try tagging the function as __attribute__((__noreturn__)), so the tool knows that it never returns.
But it should...
> Is it a good practice to free memory before exiting the program?
Yes in general.
> I've read many places online that since modern operating systems reclaim all resources before exiting, there's...
It's all very vague.
We have an expected input, but no idea about the output.
Like any of these?
$ xsel | fold -w 50
Paragraphs are the building blocks of papers. Many
students define paragraphs in terms of length: a
paragraph is a group of at least five sentences, a...
So what separates one field from another?
A comma
A tab
The fact that it's exactly 120 chars wide
> even i tried gcc -o main.c add.c
Nice, you just trashed your source file with a mis-guided -o option.
> When I ran the command gcc main.c add.c I received an error message
Right, and I'm...
> I ran your code and got error because you are using main keyword in two source file
That's because you're incapable of following instructions.
> gcc -o hello main.c add.c add_test.c
Read my...
> int c = getchar();
> while((c = getchar()) != EOF)
There are two calls to getchar before you get to your first putchar.
First you would separate functions out so they are testable to begin with.
A ball-of-mud main.c with everything in it doesn't lend itself to being tested.
// main.c
#include <stdio.h>...
First of all, it's not backspace
" " is space (cursor moves right(*))
"\b" is backspace (cursor moves left(*))
Try this
if(decision == 'y')
showfile();
else if(decision ==...
You should also read the manual page for select() while you're at it.
How to add counters
int divide(int a)
{
numcalls++;
if (a > 1) {
return divide (a/2);
}
return a;
Show us what you have so far.
qsort, qsort_s - cppreference.com is a prime example right there in the standard library.
GUI's are often implemented using callback functions - which are function pointers.
Threads are created...