|
by: Newsgroup - Ann |
last post by:
Gurus,
I have the following implementation of a member function:
class A
{
// ...
virtual double func(double v);
void caller(int i, int j, double (* callee)(double));
void foo() {caller(1, 2, func);
|
by: jr |
last post by:
Sorry for this very dumb question, but I've clearly got a long way to go!
Can someone please help me pass an array into a function. Here's a starting
point.
void TheMainFunc()
{
// Body of code...
TCHAR myArray;
DoStuff(myArray);
|
by: dave.harper |
last post by:
I'm relatively new to C++, but have a question regarding functions and
arrays. I'm passing a relatively large array to a function several
thousand times during the course of a loop, and it seems to get bogged
down. Do the arrays previously passed to the function stay memory
resident? If not, what's causing it and what can I do to correct it?
Thanks,
Dave
|
by: Christopher Benson-Manica |
last post by:
Does the following program exhibit undefined behavior? Specifically,
does passing a struct by value cause undefined behavior if that struct
has as a member a pointer that has been passed to free()?
#include <stdlib.h>
struct stype
{
int *foo;
};
|
by: Jake Thompson |
last post by:
Hello I created a DLL that has a function that is called from my main c
program.
In my exe I first get a a pointer to the address of the function by
using GetProcAddress and on the dll side I make sure that my function
is being exported by adding a line to the .def file.
This seems to work because when I debug it recognizes the dll and once
it hits the function it goes right into the proper location of the dll.
|
|
by: Andrew Bullock |
last post by:
Hi,
I have two classes, A and B,
B takes an A as an argument in its constructor:
A a1 = new A();
B b = new B(a1);
|
by: mangesh |
last post by:
This code is from c++ faq in section 11 :
void someCode()
{
char memory;
void* p = memory;
Fred* f = new(p) Fred();
f->~Fred(); // Explicitly call the destructor for the placed
object
}
|
by: dice |
last post by:
Hi,
In order to use an external api call that requires a function pointer I
am currently creating static wrappers to call my objects functions.
I want to re-jig this so I only need 1 static wrapper function.
I would prefer to be able to pass the member function as a void* to the
static wrapper but I suspect this may not even be possible.
Another solution would be option 2 below but I can't figure out the
syntax to call obj->*pFn().
...
|
by: ifitzgerald |
last post by:
I am attempting to use a wrapper class to the Win32 timer API in a Visual C++ 6.0 MFC application. The callback function needs to have access to the front panel, and as such needs to be a member of the front panel class. I kept getting compile error C2276 when I tried passing the address of a member function. After implementing a few changes suggested by the author of the class, I now get the following error when compiling:
error C2664:...
|
by: S. |
last post by:
Hi all,
Can someone please help me with this?
I have the following struct:
typedef struct {
char *name;
int age;
} Student;
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
|
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|