|
/FORCE:MULTIPLE?
Just adding a function to another class shouldn't give new linker errors,
unless you never define the function.
Did you copy the function and not change the scope resolution stuff?
With namespaces and classes (C++!) there shouldn't ever be multiple
definitions.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello,
Because of this FORCE:MULTIPLE my linker errors "already defined in another class' have become warnings so is that fine?
I had tried using
#pragma once
#ifndef
#define
#endif
but none of them worked
Thanks
Prithaa
|
|
|
|
|
I'm just suspicious -
What is defined twice in two different classes ? Is this really what you want?
Hiding it with a linker option may not be the best solution
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I am trying to expose bitmap from active x control.
I am trying to expose BYTE pointer from active x control.
Can anyone give some suggestions
S.Yamini
|
|
|
|
|
How can data be transferred into excel sheet 'row and column-wise' the way we do in list control?? My first row consists of fixed column names
|
|
|
|
|
For this bubbdy you have to use COM and you have to import some of the library files into your project like this below
#import "D:\Program Files\Microsoft Office\Office\mso97.dll" no_namespace rename("DocumentProperties", "DocumentPropertiesXL")
#import "D:\Program Files\Common Files\Microsoft Shared\VBA\vbeext1.olb" no_namespace
#import "D:\Program Files\Microsoft Office\Office\excel8.olb" no_auto_exclude rename("DialogBox", "DialogBoxXL") rename("RGB", "RBGXL") rename("DocumentProperties", "DocumentPropertiesXL") no_dual_interfaces named_guids rename_namespace("EXL")
and after that use this link
http://msdn2.microsoft.com/en-us/library/aa155776(office.10).aspx[^]
Regards,
Pankaj Sachdeva
"There is no future lies in any job"
"but"
"future lies in the person who holds the job"
|
|
|
|
|
Hi all!
I use 2 references from .NET Framework:
1. System::Xml (for parsing XML documents and getting data from it)
2. System::Convert (for converting data gained from parsing to my type)
When i use absolutely any Convert method - my app is fall!!! Anyplace to use - class, function, main() - it's fall!
When i use in WinMain app
<br />
System::String^ myString = "String to Convert";<br />
wchar_t myData = System::Convert::toChar(myString);<br />
App is fall, but when i use it in console app - it works fine!
What's problem???
|
|
|
|
|
Ooops. Sorry! Wrong forum!
|
|
|
|
|
Hi Guys,
Would you be able to help me find the code for a program that finds dead links and orphan file in a webpage developed in pure HTML. Actually, its my project for my course. I have tried for weeks and code project is my last hope.......
Thanks
|
|
|
|
|
Have you seen this, or this?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Please help.
Thanks in advance.
Max
|
|
|
|
|
You can use WM_SETFONT/CWnd::SetFont() to set a window's font at runtime.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thank you Mark.
It seems to be a stupid question. Mmmmm...
Max
|
|
|
|
|
min_2_max wrote: It seems to be a stupid question.
No. Maybe a stupid answer though.
Did you get it working?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
There seems still to be some problem.
Max
|
|
|
|
|
Lets say I have 2 classes derived from the same base. Within the base I want to have a private member. But, when one derived type is passed to another, I want that instance to be able to gain access. ie...
class Base
{
protected:
int iSomeVal;
}
class A : public Base
{
void Copy( Base* pBase )
{
iSomeVal = pBase->iSomeVal;
}
}
class B : public Base
{
}
main()
{
A foo;
B bar;
foo.Copy( &bar );
}
|
|
|
|
|
Sounds like you need a protected member, accessible to derived classes but not outside.
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
protected only works for derived types, the member would be seen as private when trying to access from outside ( which is what I am doing if you look again ).
|
|
|
|
|
You could use friend:
class A;
class Base
{
private:
int iSomeVal;
friend A;
};
class A : public Base
{
public:
void Copy( Base* pBase )
{
iSomeVal = pBase->iSomeVal;
}
};
class B : public Base
{
};
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
That works, but rather than having a forward decleration, I made it a friend of itself ( must be a loner )
|
|
|
|
|
WalderMort wrote: but rather than having a forward decleration, I made it a friend of itself
You did what? May I see it please?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
C'mon, it's 9:30 in the morning and I didn't sleep yet, is my humour really that bad
|
|
|
|
|
C'mon, it's 6:30 pm and I'm tired LOL!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
I wanted to get these sets of classes finished, but right now I'm just too tired to even look at the code. I think I'm gonna call it a night, day, mornin... oh whatever...
|
|
|
|