NO

Recent Posts

Pages: 1 ... 8 9 [10]
91
Windows questions / Re: malloc and 64 bit ?
« Last post by TimoVJL on December 10, 2022, 06:47:16 pm »
In windows 7 x64 i got address 0000000000610068h
92
Windows questions / Re: malloc and 64 bit ?
« Last post by John Z on December 10, 2022, 05:21:46 pm »
Thanks bitcoin,

Well other than two missing h files I don't see, or get, any error.  I ran both the std exe and the debug exe, no error.
Attached is the debug 'Local' tab, and a memory view of the x pointer.  BTW I set changed memset to 1 so it
is easy to see the memset results in memory.  The x location was also shown in debug by mouse hover over x
also attached screen shot and it matches the local display. The memory at the location was filled with 1s.

I'm at a loss to see a problem.

John Z

93
General discussions / Re: CreateProcess not found ?
« Last post by bitcoin on December 10, 2022, 03:12:37 pm »
TimoVJL, John Z
both method works, thanks!
94
Windows questions / Re: malloc and 64 bit ?
« Last post by bitcoin on December 10, 2022, 03:08:34 pm »
Hello, John Z
See attach
95
Windows questions / Re: malloc and 64 bit ?
« Last post by John Z on December 10, 2022, 11:49:46 am »
Hi bitcoin,

Well I searched and searched but couldn't find the error code for "doesn't work"  :)
Seriously though you are not giving enough information to allow any help to be useful.

It seems you received no error message when using the malloc, but are saying something else
did not work and you seem to be suspecting/pointing to the memory address.  Other than
that what didn't work is unspecified.  You mention 64 bit specifically, have you tried 32 bit and
does it work as you wanted?

Can you zip and post a small project that demonstrates what doesn't work?

John Z

96
Windows questions / malloc and 64 bit ?
« Last post by bitcoin on December 09, 2022, 10:56:13 pm »
Hello
If i use malloc in 64 bit program, this allocates memory in address,start in FFFFF...
and program don't work.
why?
97
Beginner questions / Re: Container libraries
« Last post by John Z on December 06, 2022, 01:33:06 pm »
When I get around to it, I may ......
;)

Will the library be 'automagically' be tracking the number of characters, the number of bytes, or both for the string?
Undoubtedly one should use all of the memory safe and string safe C functions to create a string safe library of manipulation functions. 

Would you include new string functions?  One that seem to be missing is sub-string replace.
Where a search for string from an arbitrary position looks for a sub-string and if found replaces it with a replacement string of any arbitrary length including length 0 which would remove the sub-string. The return value would be either -1 if sub-string is not found or x where x is character position 1 past the end of a last located sub-string.  There could also be a max string input since the replacement could be much larger than the sub-string.

//i = start character, ptr = pointer to string to manipulate, sub-string, replacement string, max size
i = 0;
i = strreplace( i, ptr, "Abc", "ABCD", 50);  and
i = wcsreplace(i ptr, L"AbC", L"DEFGH",50);

John Z
98
Sad to hear this.

I did not previously know the story behind the 8-bit byte and how it relates to ASCII. Even today, the C char type is exactly one byte or 8 bits. He changed it from 6 bits to 8 bits.

The wiki article is interesting.
https://en.wikipedia.org/wiki/Fred_Brooks
99
Windows questions / Re: WIN32 ComboBox control
« Last post by CandCPlusPlus on December 03, 2022, 11:43:14 pm »
I ran into this problem with the ComboBox in the Windows API. The only way to change the size of the drop-down arrow of the ComboBox is oddly by changing the font size. I don't know what possessed Microsoft to design the ComboBox like this back in the 90s.
100
Beginner questions / Re: Container libraries
« Last post by CandCPlusPlus on December 03, 2022, 08:36:20 pm »
When I get around to it, I may create a string library for C that tracks the size of the string with a variable in a struct and I will create various functions that manipulate the struct in a C-style manner. The functions will use the size being tracked in the struct to prevent buffer overflows. I do want to learn various forms of testing to test this custom library as well.
Pages: 1 ... 8 9 [10]