473,804 Members | 3,742 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

function template

Hi all,
I was working with a simple function template to find the min of two values.
But since I would like the two values to be different (type) I dont know
what kind of value (type) it will return. I tried to write something like
this:

template <class Type1, class Type2, class Type3>
Type3 findMin(Type1 x, Type2 y){

return (x < y) ? x : y;
}

but it says it cannot deduce template argument for 'Type3'
Can anyone help? Thanx
Jul 22 '05 #1
31 3541
"nikola" <se******@here. lol> wrote in message
news:Zk******** *************** @news3.tin.it.. .
Hi all,
I was working with a simple function template to find the min of two values. But since I would like the two values to be different (type) I dont know
what kind of value (type) it will return. I tried to write something like
this:

template <class Type1, class Type2, class Type3>
Type3 findMin(Type1 x, Type2 y){

return (x < y) ? x : y;
}

but it says it cannot deduce template argument for 'Type3'
Can anyone help? Thanx


Hello

Try calling it as:

findMin<int, int, int>(1, 2);

Like that you have specified all the types.

--

Elias
Jul 22 '05 #2
nikola wrote:
Hi all,
I was working with a simple function template to find the min of two
values. But since I would like the two values to be different (type) I
dont know what kind of value (type) it will return. I tried to write
something like this:

template <class Type1, class Type2, class Type3>
Type3 findMin(Type1 x, Type2 y){

return (x < y) ? x : y;
}

but it says it cannot deduce template argument for 'Type3'


Well, first of all, the return type of a function is fixed at compile
time. And how would the compiler know which one to return?
Seond, the 2nd and 3rd argument of the ?: operator need to be of the
same type, too, so one of your arguments is converted to the other's
type anyway. Similar for operator<. So you can just write:

template <class Type>
Type findMin(Type x, Type y){
return (x < y) ? x : y;
}

Jul 22 '05 #3
nikola wrote:
Hi all,
I was working with a simple function template to find the min of two values.
But since I would like the two values to be different (type) I dont know
what kind of value (type) it will return. I tried to write something like
this:

template <class Type1, class Type2, class Type3>
Type3 findMin(Type1 x, Type2 y){

return (x < y) ? x : y;
}

but it says it cannot deduce template argument for 'Type3'
Can anyone help? Thanx


This is a classic template issue.

What you really want is :

template <typename T1, typename T2>
typename Promote<T1,T2>: :type min( const T1 & x, const T2 & y )
{
return x < y ? x : y;
}

Where Promote is a template that will perform the right "promotion" for
T1 and T2.

If the "typeof()" function was standard, you could simply do this:
template <typename T1, typename T2>
struct Promote
{
typedef typeof( T1() + T2() ) type;
};

.... but alas, things are not so simple in the standard world.

We need to figure it out ourselves so we have to use partial template
specialization.

Start with the basic template:
template <typename T1, typename T2>
struct Promote
{
};

// the same types are the same ! cool

template <typename T1>
struct Promote<T1,T1>
{
typedef T1 type;
};

// specify all the type promotions ...

template <> struct Promote<unsigne d char,char> { typedef int type; };
template <> struct Promote<signed char,char> { typedef int type; };
template <> struct Promote<short,c har> { typedef int type; };
template <> struct Promote<unsigne d short,char> { typedef int type; };
template <> struct Promote<int,cha r> { typedef int type; };
template <> struct Promote<unsigne d int,char> { typedef unsigned int
type; };
template <> struct Promote<long,ch ar> { typedef long type; };
template <> struct Promote<unsigne d long,char> { typedef unsigned long
type; };
template <> struct Promote<long long,char> { typedef long long type; };
template <> struct Promote<unsigne d long long,char> { typedef unsigned
long long type; };
template <> struct Promote<float,c har> { typedef float type; };
template <> struct Promote<double, char> { typedef double type; };
template <> struct Promote<long double,char> { typedef long double type; };
template <> struct Promote<char,un signed char> { typedef int type; };
template <> struct Promote<signed char,unsigned char> { typedef int type; };
template <> struct Promote<short,u nsigned char> { typedef int type; };
template <> struct Promote<unsigne d short,unsigned char> { typedef int
type; };
template <> struct Promote<int,uns igned char> { typedef int type; };
template <> struct Promote<unsigne d int,unsigned char> { typedef
unsigned int type; };
template <> struct Promote<long,un signed char> { typedef long type; };
template <> struct Promote<unsigne d long,unsigned char> { typedef
unsigned long type; };
template <> struct Promote<long long,unsigned char> { typedef long long
type; };
template <> struct Promote<unsigne d long long,unsigned char> { typedef
unsigned long long type; };
template <> struct Promote<float,u nsigned char> { typedef float type; };
template <> struct Promote<double, unsigned char> { typedef double type; };
template <> struct Promote<long double,unsigned char> { typedef long
double type; };
template <> struct Promote<char,si gned char> { typedef int type; };
template <> struct Promote<unsigne d char,signed char> { typedef int type; };
template <> struct Promote<short,s igned char> { typedef int type; };
template <> struct Promote<unsigne d short,signed char> { typedef int
type; };
template <> struct Promote<int,sig ned char> { typedef int type; };
template <> struct Promote<unsigne d int,signed char> { typedef unsigned
int type; };
template <> struct Promote<long,si gned char> { typedef long type; };
template <> struct Promote<unsigne d long,signed char> { typedef unsigned
long type; };
template <> struct Promote<long long,signed char> { typedef long long
type; };
template <> struct Promote<unsigne d long long,signed char> { typedef
unsigned long long type; };
template <> struct Promote<float,s igned char> { typedef float type; };
template <> struct Promote<double, signed char> { typedef double type; };
template <> struct Promote<long double,signed char> { typedef long
double type; };
template <> struct Promote<char,sh ort> { typedef int type; };
template <> struct Promote<unsigne d char,short> { typedef int type; };
template <> struct Promote<signed char,short> { typedef int type; };
template <> struct Promote<unsigne d short,short> { typedef int type; };
template <> struct Promote<int,sho rt> { typedef int type; };
template <> struct Promote<unsigne d int,short> { typedef unsigned int
type; };
template <> struct Promote<long,sh ort> { typedef long type; };
template <> struct Promote<unsigne d long,short> { typedef unsigned long
type; };
template <> struct Promote<long long,short> { typedef long long type; };
template <> struct Promote<unsigne d long long,short> { typedef unsigned
long long type; };
template <> struct Promote<float,s hort> { typedef float type; };
template <> struct Promote<double, short> { typedef double type; };
template <> struct Promote<long double,short> { typedef long double type; };
template <> struct Promote<char,un signed short> { typedef int type; };
template <> struct Promote<unsigne d char,unsigned short> { typedef int
type; };
template <> struct Promote<signed char,unsigned short> { typedef int
type; };
template <> struct Promote<short,u nsigned short> { typedef int type; };
template <> struct Promote<int,uns igned short> { typedef int type; };
template <> struct Promote<unsigne d int,unsigned short> { typedef
unsigned int type; };
template <> struct Promote<long,un signed short> { typedef long type; };
template <> struct Promote<unsigne d long,unsigned short> { typedef
unsigned long type; };
template <> struct Promote<long long,unsigned short> { typedef long long
type; };
template <> struct Promote<unsigne d long long,unsigned short> { typedef
unsigned long long type; };
template <> struct Promote<float,u nsigned short> { typedef float type; };
template <> struct Promote<double, unsigned short> { typedef double type; };
template <> struct Promote<long double,unsigned short> { typedef long
double type; };
template <> struct Promote<char,in t> { typedef int type; };
template <> struct Promote<unsigne d char,int> { typedef int type; };
template <> struct Promote<signed char,int> { typedef int type; };
template <> struct Promote<short,i nt> { typedef int type; };
template <> struct Promote<unsigne d short,int> { typedef int type; };
template <> struct Promote<unsigne d int,int> { typedef unsigned int type; };
template <> struct Promote<long,in t> { typedef long type; };
template <> struct Promote<unsigne d long,int> { typedef unsigned long
type; };
template <> struct Promote<long long,int> { typedef long long type; };
template <> struct Promote<unsigne d long long,int> { typedef unsigned
long long type; };
template <> struct Promote<float,i nt> { typedef float type; };
template <> struct Promote<double, int> { typedef double type; };
template <> struct Promote<long double,int> { typedef long double type; };
template <> struct Promote<char,un signed int> { typedef unsigned int
type; };
template <> struct Promote<unsigne d char,unsigned int> { typedef
unsigned int type; };
template <> struct Promote<signed char,unsigned int> { typedef unsigned
int type; };
template <> struct Promote<short,u nsigned int> { typedef unsigned int
type; };
template <> struct Promote<unsigne d short,unsigned int> { typedef
unsigned int type; };
template <> struct Promote<int,uns igned int> { typedef unsigned int type; };
template <> struct Promote<long,un signed int> { typedef unsigned long
type; };
template <> struct Promote<unsigne d long,unsigned int> { typedef
unsigned long type; };
template <> struct Promote<long long,unsigned int> { typedef long long
type; };
template <> struct Promote<unsigne d long long,unsigned int> { typedef
unsigned long long type; };
template <> struct Promote<float,u nsigned int> { typedef float type; };
template <> struct Promote<double, unsigned int> { typedef double type; };
template <> struct Promote<long double,unsigned int> { typedef long
double type; };
template <> struct Promote<char,lo ng> { typedef long type; };
template <> struct Promote<unsigne d char,long> { typedef long type; };
template <> struct Promote<signed char,long> { typedef long type; };
template <> struct Promote<short,l ong> { typedef long type; };
template <> struct Promote<unsigne d short,long> { typedef long type; };
template <> struct Promote<int,lon g> { typedef long type; };
template <> struct Promote<unsigne d int,long> { typedef unsigned long
type; };
template <> struct Promote<unsigne d long,long> { typedef unsigned long
type; };
template <> struct Promote<long long,long> { typedef long long type; };
template <> struct Promote<unsigne d long long,long> { typedef unsigned
long long type; };
template <> struct Promote<float,l ong> { typedef float type; };
template <> struct Promote<double, long> { typedef double type; };
template <> struct Promote<long double,long> { typedef long double type; };
template <> struct Promote<char,un signed long> { typedef unsigned long
type; };
template <> struct Promote<unsigne d char,unsigned long> { typedef
unsigned long type; };
template <> struct Promote<signed char,unsigned long> { typedef unsigned
long type; };
template <> struct Promote<short,u nsigned long> { typedef unsigned long
type; };
template <> struct Promote<unsigne d short,unsigned long> { typedef
unsigned long type; };
template <> struct Promote<int,uns igned long> { typedef unsigned long
type; };
template <> struct Promote<unsigne d int,unsigned long> { typedef
unsigned long type; };
template <> struct Promote<long,un signed long> { typedef unsigned long
type; };
template <> struct Promote<long long,unsigned long> { typedef long long
type; };
template <> struct Promote<unsigne d long long,unsigned long> { typedef
unsigned long long type; };
template <> struct Promote<float,u nsigned long> { typedef float type; };
template <> struct Promote<double, unsigned long> { typedef double type; };
template <> struct Promote<long double,unsigned long> { typedef long
double type; };
template <> struct Promote<char,lo ng long> { typedef long long type; };
template <> struct Promote<unsigne d char,long long> { typedef long long
type; };
template <> struct Promote<signed char,long long> { typedef long long
type; };
template <> struct Promote<short,l ong long> { typedef long long type; };
template <> struct Promote<unsigne d short,long long> { typedef long long
type; };
template <> struct Promote<int,lon g long> { typedef long long type; };
template <> struct Promote<unsigne d int,long long> { typedef long long
type; };
template <> struct Promote<long,lo ng long> { typedef long long type; };
template <> struct Promote<unsigne d long,long long> { typedef long long
type; };
template <> struct Promote<unsigne d long long,long long> { typedef
unsigned long long type; };
template <> struct Promote<float,l ong long> { typedef float type; };
template <> struct Promote<double, long long> { typedef double type; };
template <> struct Promote<long double,long long> { typedef long double
type; };
template <> struct Promote<char,un signed long long> { typedef unsigned
long long type; };
template <> struct Promote<unsigne d char,unsigned long long> { typedef
unsigned long long type; };
template <> struct Promote<signed char,unsigned long long> { typedef
unsigned long long type; };
template <> struct Promote<short,u nsigned long long> { typedef unsigned
long long type; };
template <> struct Promote<unsigne d short,unsigned long long> { typedef
unsigned long long type; };
template <> struct Promote<int,uns igned long long> { typedef unsigned
long long type; };
template <> struct Promote<unsigne d int,unsigned long long> { typedef
unsigned long long type; };
template <> struct Promote<long,un signed long long> { typedef unsigned
long long type; };
template <> struct Promote<unsigne d long,unsigned long long> { typedef
unsigned long long type; };
template <> struct Promote<long long,unsigned long long> { typedef
unsigned long long type; };
template <> struct Promote<float,u nsigned long long> { typedef float
type; };
template <> struct Promote<double, unsigned long long> { typedef double
type; };
template <> struct Promote<long double,unsigned long long> { typedef
long double type; };
template <> struct Promote<char,fl oat> { typedef float type; };
template <> struct Promote<unsigne d char,float> { typedef float type; };
template <> struct Promote<signed char,float> { typedef float type; };
template <> struct Promote<short,f loat> { typedef float type; };
template <> struct Promote<unsigne d short,float> { typedef float type; };
template <> struct Promote<int,flo at> { typedef float type; };
template <> struct Promote<unsigne d int,float> { typedef float type; };
template <> struct Promote<long,fl oat> { typedef float type; };
template <> struct Promote<unsigne d long,float> { typedef float type; };
template <> struct Promote<long long,float> { typedef float type; };
template <> struct Promote<unsigne d long long,float> { typedef float
type; };
template <> struct Promote<double, float> { typedef double type; };
template <> struct Promote<long double,float> { typedef long double type; };
template <> struct Promote<char,do uble> { typedef double type; };
template <> struct Promote<unsigne d char,double> { typedef double type; };
template <> struct Promote<signed char,double> { typedef double type; };
template <> struct Promote<short,d ouble> { typedef double type; };
template <> struct Promote<unsigne d short,double> { typedef double type; };
template <> struct Promote<int,dou ble> { typedef double type; };
template <> struct Promote<unsigne d int,double> { typedef double type; };
template <> struct Promote<long,do uble> { typedef double type; };
template <> struct Promote<unsigne d long,double> { typedef double type; };
template <> struct Promote<long long,double> { typedef double type; };
template <> struct Promote<unsigne d long long,double> { typedef double
type; };
template <> struct Promote<float,d ouble> { typedef double type; };
template <> struct Promote<long double,double> { typedef long double
type; };
template <> struct Promote<char,lo ng double> { typedef long double type; };
template <> struct Promote<unsigne d char,long double> { typedef long
double type; };
template <> struct Promote<signed char,long double> { typedef long
double type; };
template <> struct Promote<short,l ong double> { typedef long double type; };
template <> struct Promote<unsigne d short,long double> { typedef long
double type; };
template <> struct Promote<int,lon g double> { typedef long double type; };
template <> struct Promote<unsigne d int,long double> { typedef long
double type; };
template <> struct Promote<long,lo ng double> { typedef long double type; };
template <> struct Promote<unsigne d long,long double> { typedef long
double type; };
template <> struct Promote<long long,long double> { typedef long double
type; };
template <> struct Promote<unsigne d long long,long double> { typedef
long double type; };
template <> struct Promote<float,l ong double> { typedef long double type; };
template <> struct Promote<double, long double> { typedef long double
type; };

//
// and now the min template ...

template <typename T1, typename T2>
typename Promote<T1,T2>: :type min( const T1 & x, const T2 & y )
{
return x < y ? x : y;
}

That's a bit long winded. However, some people might arge that type
promotion is a bad thing and that the developer really needs to make
sure that the parameters to min (or max) are the same type, in which
case the template becomes easy to write.

Jul 22 '05 #4
nikola wrote:

template <class Type1, class Type2, class Type3>
Type3 findMin(Type1 x, Type2 y){

return (x < y) ? x : y;
}

but it says it cannot deduce template argument for 'Type3'
Can anyone help? Thanx


#define findMin(x, y) ((x) < (y)) ? (x) : (y))

Otherwise you have to write template code that duplicates the promotion
rules, and that will be rather long-winded.

--

Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
Jul 22 '05 #5
Pete Becker wrote:
nikola wrote:
template <class Type1, class Type2, class Type3>
Type3 findMin(Type1 x, Type2 y){

return (x < y) ? x : y;
}

but it says it cannot deduce template argument for 'Type3'
Can anyone help? Thanx

#define findMin(x, y) ((x) < (y)) ? (x) : (y))

Otherwise you have to write template code that duplicates the promotion
rules, and that will be rather long-winded.


Gee, that's neat. Until somebody tries to

findMin( ++i, j );
Jul 22 '05 #6
Jeff Schwab wrote:

Pete Becker wrote:
nikola wrote:
template <class Type1, class Type2, class Type3>
Type3 findMin(Type1 x, Type2 y){

return (x < y) ? x : y;
}

but it says it cannot deduce template argument for 'Type3'
Can anyone help? Thanx

#define findMin(x, y) ((x) < (y)) ? (x) : (y))

Otherwise you have to write template code that duplicates the promotion
rules, and that will be rather long-winded.


Gee, that's neat. Until somebody tries to

findMin( ++i, j );


Yes, that's a limitation. The proposed template solutions also have
limitations: one requires you to specify the return type at each call
site, one requires a loooong list of template specializations , and one
won't compile. Which do you prefer?

--

Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
Jul 22 '05 #7
Pete Becker wrote:
Jeff Schwab wrote:
Pete Becker wrote:
nikola wrote:
template <class Type1, class Type2, class Type3>
Type3 findMin(Type1 x, Type2 y){

return (x < y) ? x : y;
}

but it says it cannot deduce template argument for 'Type3'
Can anyone help? Thanx
#define findMin(x, y) ((x) < (y)) ? (x) : (y))

Otherwise you have to write template code that duplicates the promotion
rules, and that will be rather long-winded.


Gee, that's neat. Until somebody tries to

findMin( ++i, j );

Yes, that's a limitation. The proposed template solutions also have
limitations: one requires you to specify the return type at each call
site, one requires a loooong list of template specializations , and one
won't compile. Which do you prefer?


The one with the long list of specializations , which can be (and now
have been) written in a single file, and henceforth hardly need be
noticed again.
Jul 22 '05 #8
Jeff Schwab wrote:

The one with the long list of specializations , which can be (and now
have been) written in a single file, and henceforth hardly need be
noticed again.


Except when it has to be modified to handle additional types, which is a
common failing of brute force techniques.

--

Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
Jul 22 '05 #9
> > The one with the long list of specializations , which
can be (and now have been) written in a single file,
and henceforth hardly need be noticed again.


Except when it has to be modified to handle additional
types, which is a common failing of brute force
techniques.


True, but in this case we are forced to choose between
the lesser of two evils: the dreaded macro or a brute
force mess of template specializations . The best
compromise I have found is from the Blitz++ library.
The solution doesn't always adhere to C++ promotion
rules, but comes very close without (as much) brute
force:

http://cvs.sourceforge.net/viewcvs.p...litz/promote.h

This common problem seems to indicate that C++ could
be made more template metaprogramming friendly.
Jul 22 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2722
by: Trevor Lango | last post by:
What is the appropriate syntax for placing a friend function that includes as one of it's parameters a pointer to the class object itself within the template class? I have the following: //**************************************************** // testClass.h //**************************************************** #ifndef TESTCLASS_H
5
2965
by: Suzanne Vogel | last post by:
Is it possible to store a pointer to a template function? eg, template<class T> fooFunc() {...} fptr = fooFunc; // <-- I couldn't find any info here, not even in the forums: http://www.function-pointer.org/
1
1749
by: Arne Petersen | last post by:
Hy, I've got a problem with member function templates compiled into libraries. I'm trying to get a library collection (coded for GNU gcc, where its compiled completly) being compiled on Visual Studio .NET. The problem is that for gcc the template functions (members of a class) are explicitly instantiated in a cpp file that includes the classes .h and .cpp file. The VS compiler does not correctly bring together the function template...
16
16295
by: WittyGuy | last post by:
Hi, What is the major difference between function overloading and function templates? Thanks! http://www.gotw.ca/resources/clcm.htm for info about ]
7
9448
by: quarup | last post by:
I want to specialize a template function that lives inside a class, but am getting a compile error in VS.net 2003. Here's my code: template <class T> class A { public: template <class U> void f() const; };
50
3341
by: LaundroMat | last post by:
Suppose I have this function: def f(var=1): return var*2 What value do I have to pass to f() if I want it to evaluate var to 1? I know that f() will return 2, but what if I absolutely want to pass a value to f()? "None" doesn't seem to work.. Thanks in advance.
5
2272
by: StephQ | last post by:
This is from a thread that I posted on another forum some days ago. I didn't get any response, so I'm proposing it in this ng in hope of better luck :) The standard explanation is that pointer to functions are hard to inline for the compiler, and so you won't be able to avoid function call overhead. This is an important aspect when you are calling a function very frequently for evaluation reason: think of the problem of performing...
8
5319
by: Jess | last post by:
Hi, I have a template function that triggered some compiler error. The abridged version of the class and function is: #include<memory> using namespace std; template <class T>
8
284
by: William Xu | last post by:
Compiling: template <class T = int> T foo(const T& t) {} int main(int argc, char *argv) {} gcc complains:
21
4750
by: H9XLrv5oXVNvHiUI | last post by:
Hi, I have a question about injecting friend functions within template classes. My question is specific to gcc (version 3.4.5) used in combination with mingw because this code (or at least code that gets the same result) works as expected in visualc++. I know that this is probably not the right behavior for a compiler but it's the kind of behavior I'm searching for so I was hoping there was a way to do the same thing in gcc. As you know...
0
9571
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,...
0
10561
Oralloy
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...
0
10318
jinu1996
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...
1
10302
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
tracyyun
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9132
agi2029
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...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6845
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();...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.