But that is exactly what I wanted to know!
If it was possible for me to have malloc with different sizes, as you showed in char *data.
I will now try to make a test of it here!
Type: Posts; User: marcelo.br
But that is exactly what I wanted to know!
If it was possible for me to have malloc with different sizes, as you showed in char *data.
I will now try to make a test of it here!
The problem you mention is valid! And it will give problems in the future.
At the moment, until the end of the year, I won't have this problem. I am studying in the future to do a reading from a...
I have attached images for everyone to understand
I don't mind using struct, matrix, or any other kind of resource that I don't know the name of!
What I don't want is to allocate 500Mb for a...
This pointer comes from a function like this, and I want to remove a part of the string
void search(char *DirectoryPath)
#include <stdio.h>
int main() {
// How do I make it work?
char...
Ok, if it doesn't work with struct and not with matrix.
Is there something else I could use in C that would work?
Because there are fields that are extremely huge, and others that take only a few...
Can I enter a size for each field here? example:
char *Database[][6];
Database[0][0] = malloc 100 bytes
Database[1][0] = malloc 500 bytes
Database[2][0] = malloc 800 bytes
Great tip!
Thank you for your attention!
Anyway,
Can I assign different bytes to each record without problems? As I asked here?
Record 1 = Field1 = 100 bytes = Fields[0].Field1
Record 2 =...
Good afternoon everyone,
I need a struct where its internal fields are dynamically allocated and the number of records is also dynamically allocated.
My question is that I have no idea how it...
Trying to explain better.
An image is just an array of bytes (like any other file).
How can I get the image below
16536
and turn it into this
Trying to explain better.
In the example below I have an image written in source!
Notice that it's not captured from anywhere on the computer, it's in the source!
I want to be able to convert...
I don't understand, how can I write this in source?
I also don't know how to convert the image to text!
The image will be loaded from source written as a text! Because it doesn't exist on the...
As I stated in the question. I want the png written in the source. Not in memory, so there is no icon.png
Example, below is an image written in source that I can save as a png if I want!
...
Please read my question!
I need to put an icon in a Window, and I need this icon to be written inside the source!
Example: my_icon = image data
I don't want the icon to be pulled from Hard...
I would like to know if there is any command or way of knowing the memory allocated from a pointer in the following conditions:
MyPointer is a char pointer (char *MyPointer)
It has 300 bytes...
WOW!!! WOW!!! WOW!!!
It was something like that I really wanted! One way not to declare identifier or typedef!
Congratulations, thank you! My goal is to learn! And your solution taught me a...
I think you did not read the question! Your code is full of identifiers!
And between the example I showed compared to yours, mine is much simpler, if I wanted to use identifier!
I understand what it says! I just want to have 100% sure if it's possible or not!
See: GCC works with anonymous struct! Your compilation refers that you forgot any punctuation! (gcc v.9.2.0 or superior)
You can compile even by checking all errors: gcc test.c -o test -O3 -Wall...
It's more a situation on how to do it! Nothing special!
In my case, my interest is in a Struct!
Believing it will be possible to do this without declaring an identifier or typedef
Good afternoon everyone!
I would like not to use the struct identifier to make the qsort work
Note: I also do not want to use typedef
#include <stdio.h>
#include <stdlib.h>
#include...
I understand your point. But this is a warning window! And it needs to be shown on top of the Window that called it!
So even if you have multiple monitors, it will only be displayed on the monitor...
Thanks for trying to help, but this calculation you didn't know how to do! left and top could never be ZERO because the main window would never be in this position!
I managed to solve the problem...
Left and Top are already zero. I already do that to calculate the Desktop Center!
I calculate based on the Desktop Screen Size, but the Desktop screen does not change its x,y position.
I need to...
I can calculate how to center a window on the desktop screen.
But I'm not able to center a window inside another window! That's because the Window can be in any position on the Screen.
Does...
Thanks for responding! Thanks for Link, I'm sure it'll be useful, because I'll test it! It has old sources in Delphi and it would be nice to see them on Linux.
But at the moment my focus is C and...