|
by: Ben |
last post by:
Hi, there.
Recently I was working on a problem where we want to save generic
closures in a data structure (a vector). The closure should work for
any data type and any method with pre-defined signature.
When developing this lib, I figured that the
pointer-to-member-function, although seemingly an attractive solution,
does not work well...
|
by: Joel |
last post by:
Hi all,
Forgive me if I've expressed the subject line ill.
What I'm trying to do is to call a c++ function given the following:
a. A function name. This would be used to fetch a list of function
descriptors for the overloaded functions of that name. A function
descriptor would contain the address of the function to be called, and
a...
|
by: Charles Sullivan |
last post by:
The library function 'qsort' is declared thus:
void qsort(void *base, size_t nmemb, size_t size,
int(*compar)(const void *, const void *));
If in my code I write:
int cmp_fcn(...);
int (*fcmp)() = &cmp_fcn;
qsort(..., fcmp);
then everything works. But if instead I code qsort as:
|
by: Mike |
last post by:
Hi! I am trying to write a function that will span a thread for me.
Eventually I want to incorporate this finction into a class:
public void SpanThread(string threadName,string threadDelegate
,ThreadPriority threadPriority, bool haveCallingThreadWaitToComplete)
{
// Bombs on this line:
ThreadStart newThreadStart = new...
|
by: Richard Grant |
last post by:
Hi. In c/C++ i can pass the address of a subroutine to another subroutine as an actual parameter
How do I do that in VB .NET
What should be the syntax for a parameter to receive the address of a subroutine
Let's say theres a sub that creates buttons and I want it to receive as a parameter the address of the sub that handles the OnClick event...
|
|
by: Eric Sabine |
last post by:
OK, I'm trying to further my understanding of threading. The code below I
wrote as kind of a primer to myself and maybe a template that I could use in
the future. What I tried to do was pass data into a background thread and
get other data out and also update the main thread on which the main form
was created. It seems to work fine. The...
|
by: ChrisB |
last post by:
Coming from a C/C++ background, how would I pass a function pointer to a
function? I want to write a function that handles certain thread spawning.
Here's what I'm trying to invision:
function( thesub as <functionptr?> )
dim t as new system.threading.thread( _
new system.threading.threadstart( Addressof thesub ))
....
How can I get...
|
by: Haxan |
last post by:
Hi,
I have my main application class(unmanaged) that has a none static member
function that I need to pass as a delegate to managed C# method.
In one of the methods of this class(unmamanged), I am calling a managed C#
method(I use gcnew to instantiate the managed class). One of the parameters
of this C# method is a delegate. I need to...
|
by: vcquestions |
last post by:
Hi.
Is there way to have a function pointer to a delegate in c++/cli that
would allow me to pass delegates with the same signatures as
parameters to a method?
I'm working with managed code. Let's say we have 2 delegates:
public delegate void FirstDelegate( int i );
public delegate void SecondDelegate( int i );
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
|