Search:
Type: Posts; User: 2kaud
Search:
Search took 0.39 seconds.
-
This is a direct copy from this:
https://cplusplus.com/forum/general/285622/
-
April 14th, 2024, 04:23 AM
For info about using threads with ui see:
http://www.flounder.com/uithreads.htm
http://www.flounder.com/workerthreads.htm
-
April 14th, 2024, 04:18 AM
By default new raises an exception if an allocation issue arises. To have new return nullptr (nullptr in C++ not NULL) you need to indicate this by using std::nothrow. eg
auto p {new...
-
March 18th, 2024, 04:36 AM
For templates, the definition needs to be in the .h file - not declaration in the .h file with the definition (body) in a .cpp file as you have in post #1
-
March 3rd, 2024, 05:33 AM
[Also asked here https://www.vbforums.com/showthread.php?902874-VB-net-Slots-game-bug-not-easily-apparent ]
-
February 18th, 2024, 07:07 AM
It's always been like that except that "%lf" came with c99/C++11 when long double was introduced. Note that that MS VS double and long double are the same.
PS. Why are we both working on a Sunday...
-
February 18th, 2024, 05:41 AM
Yes. See:
int main() {
printf("%+05.1lf\n", 1.456);
printf("%+05.1lf\n", 123.456);
printf("%+05.1lf\n", -13.456);
}
-
February 16th, 2024, 11:23 AM
Not always. Skipping of initial white-space with >> for a char can be compiler dependent. With MS VS2022 this works OK:
#include <iostream>
int main() {
int i {};
char ch {};
-
February 15th, 2024, 05:44 AM
Consider as code refactored to use functions etc. This is OK with VS2022:
#include <iostream>
#include <cstdlib>
constexpr size_t noQuest { 10 }; // Number of questions
constexpr int...
-
February 7th, 2024, 04:43 AM
You could also consider using a pipe
https://learn.microsoft.com/en-us/windows/win32/ipc/named-pipes
-
February 5th, 2024, 04:41 AM
[Also see https://www.vbforums.com/showthread.php?902583-Why-are-there-no-cooperative-areas-here-Or-are-there&p=5631675#post5631675 ]
There is this forum for Programming Projects.
-
January 7th, 2024, 11:28 AM
The sizes of the used arrays are large. That's why it's exceeding the stack limit as these are allocated on the stack. Probably the easiest way to allocate these off the stack is to make them global...
-
January 4th, 2024, 08:07 AM
The in parameter requires a 16-bit number in TCP/IP network byte order. As the cast is from char* to u-short* the order of bytes ptrCurrent_Field[0] and ptrCurrent_Field[1] is important and isn't...
-
January 4th, 2024, 06:06 AM
-
January 3rd, 2024, 04:31 AM
Then
shortTTL = ntohs(*ptrCurrent_Field);
assuming that ptrCurrent_Field is not NULL and is valid.
Sorry my bad/mistake. See Salam's post below. I misread the previous post for the...
-
January 2nd, 2024, 07:56 AM
ntohs() requires a u_short param (unsigned) and not a short (signed). So try:
shortTTL = ntohs((u_short)*ptrCurrent_Field);
Assuming that ptrCurrent_Field isn't of void*. What is the type...
-
January 1st, 2024, 07:35 AM
That depends upon what the used api documentation says. You don't provide any code for us to have a look at.
-
December 27th, 2023, 11:42 AM
For VB6, you'd probably be better off using our sister vbforum site.
https://www.vbforums.com/forumdisplay.php?1-Visual-Basic-6-and-Earlier
If you just want VB6 on this codeguru forum, then...
-
December 21st, 2023, 06:52 AM
As translated:
Hello community,
I am interested in salary portage as a freelance IT specialist and I am trying to understand if this model can be a viable alternative to other forms of...
-
December 20th, 2023, 11:26 AM
[Also asked here https://www.vbforums.com/showthread.php?902023-how-to-connect-to-a-pin-machine-in-my-vb6-invoice-software&p=5626242#post5626242 ]
-
December 13th, 2023, 08:23 AM
For MS Windows, the function is _access() as access() isn't a c-standard but Posix. But AFAIK this also doesn't understand %n. Apart from access(), what other functions does the program use that...
-
December 12th, 2023, 07:01 AM
No. You don't need threads. I just pasted as an example some of my code which is within a thread and explained why a queue is used. Where it uses wait_enqueue() just directly use the char. Alter the...
-
December 12th, 2023, 04:37 AM
Well this is based upon how I do this. I use client/server with a shared circular buffer. This code is part of the console server and obtains chars from the keyboard and puts them in the buffer and...
-
December 11th, 2023, 04:19 AM
Is this a class exercise? See https://cplusplus.com/forum/general/285683/ where this question has been asked and answered previously.
-
December 8th, 2023, 12:05 PM
Is this helpful
https://sqlite.org/forum/info/09d27e962aa890b9
This if for VB but see the discussion re why this error happens and how to fix it....
|
Click Here to Expand Forum to Full Width
|