|
How can it be used form outlook or an rss reader?
|
|
|
|
|
tom groezer wrote: How can it be used form outlook or an rss reader?
Sorry, I don't use Outlook. Put the following line into your browser's address field and see what happens:
news://comp.lang.c++
|
|
|
|
|
tom groezer wrote: How can it be used form outlook
It can't, without a plugin of some sort. You can use OE, however.
"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
|
|
|
|
|
I cant seem to find this anywhere, but does anyone know what WinAPI to call when doing a lookup of the windows Domain/Workspace ? Ive searched MSDN over and over and cant find a thing that has to do with what im trying to do. I thought GetDomainName() would work, but to no avail. It doesnt, thanx in advance!
|
|
|
|
|
main()<br />
{<br />
int x=2.4;<br />
if(x==2.4)<br />
cout<<"true";<br />
else<br />
cout<<"false";<br />
return 0;<br />
}
Well it is not working, help me out please!
Spread wat u Know!
|
|
|
|
|
You cannot compare FP numbers in this fashion. You'll need something like:
if (fabs(x - 2.4) < 0.00001)
cout << "true" << endl; See here for more.
"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
|
|
|
|
|
Thnx but I did visit Bruce Dawson
But couldnt get it in nutshell
Please will u?
Spread wat u Know!
|
|
|
|
|
in short, a computer cannot "always" represent a floating point number accurately in binary format, and a precision error will be inserted when converting back and forth between the floating point number and the binary representation.
for example :
2.4 can be "errored" to something like either 2.39999999 or 2.40000001
|
|
|
|
|
Thnkx a lot..............
Does this mean IEEE32/64 arent good enough to store FPs accurately AND wat when we use the same number to print on screen......i mean how is that FP printed accurately?
N sorry it is actually float x=2.4;
Spread wat u Know!
|
|
|
|
|
Cmania wrote: int x=2.4;
you need to go look at the definition of "int"
|
|
|
|
|
Here's an CodeProject article that discusses this issue:
http://www.codeproject.com/tips/FloatingPointEquality.asp[^]
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I am writing an MFC DLL and I am getting the following linker error:
error LNK2001: unresolved external symbol "private: static class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > CApp::m_sDllVersion" (?m_sDllVersion@CApp@@0V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A)
I have the CApp class decalred thus:
#pragma once<br />
<br />
#ifndef __AFXWIN_H__<br />
#error include 'stdafx.h' before including this file for PCH<br />
#endif<br />
<br />
#include "resource.h"
#include <string><br />
<br />
using namespace std;<br />
<br />
class CApp : public CWinApp<br />
{<br />
public:<br />
CApp();<br />
<br />
static const char* GetDllVersion( void );<br />
<br />
public:<br />
virtual BOOL InitInstance();<br />
<br />
DECLARE_MESSAGE_MAP()<br />
<br />
private:<br />
static string m_sDllVersion;<br />
};
|
|
|
|
|
You have to initialise static member variables, for instance
static string CApp::m_sDllVersion="";
inside one .cpp source file.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
No that isn't it, but thanks anyway.
I had both VS6 and VS2003 installed and I think it was trying to use the wrong lib. I have now un-installed VS6 and cleared out my system path and lib variables of any reference to VS6 folders. Have re-started the PC and still have the error. At work I managed to get around the problem by telling the linker to link to a VS2003 MFC lib but I cannot now remember which one it was!
I am still getting the linker error! If anyone knows of the answer I would appreciate their input. If I solve this I will post what I did in here, in case someone else encounters the same issue.
|
|
|
|
|
Andy H wrote: No that isn't it
Sure? AFAIK you MUST initialize static members.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
That is true, but maybe he's just not showing us that he has initialized it in his .cpp file. He should make it clear to us whether he has or has not done this.
|
|
|
|
|
I agree, on the other hand, the Linker error message content supports my hypothesis...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
class A<br />
{<br />
public:<br />
virtual void f(){cout << "I'm into base \n";}<br />
};<br />
<br />
class B : public A<br />
{<br />
public:<br />
virtual void f(){cout << "I'm into derived \n";} <br />
};
In the above code will there be two virtual tables that will be created or the creation of a virtual table depends on what objects is being created. Lets say if a pointer to derived class B is obtained by doing a static_cast on the pointer returned from a dynamic creation of object of class A when I see the debugger it shows the __vfptr to some address with const A::'vftable'. Does it mean that there is only one vtable that is created.
So basically the query boils down to the fact that how many vtable are created on declaration of classes with virtual functions.
|
|
|
|
|
tom groezer wrote: So basically the query boils down to the fact that how many vtable are created on declaration of classes with virtual functions.
One vtable per class (not per object). Each object with virtual functions contains one (hidden) pointer to one vtable. At least that's an educated guess because compilers are free to implement polymorphisms any way they want, even without a vtable mechanism.
|
|
|
|
|
Since Class A is part of class B, they will use common Virtual Table
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief And You
|
|
|
|
|
Hi,
I have a workspace in VS 6.0. This workspace contains 10 projects, each project depends one or other. Since one project is dependant of other, the projects should be built in an order, so that a particular project will get built only after building its dependencies. This will avoid the build error (lib file not found/open or like link error).
But when I tried to build the workspace, it is building the project as in the order in the workspace (but not in the order we required). So can any one help me how to build all the projects in a workspace in a required order?
My guess, one way to solve the problem is, making use of Make file. But I never worked with Make file. If my guess is correct, can any one help me how to use Make file.
Also please let me know, if there is any other way to build the projects in a workspace can be build in a required order.
- Nandu
|
|
|
|
|
I don't know for VC6 but in Visual Studio 2005 you can right click on a project and select 'Project Dependencies'. There, you can check all the projects that are required for this project to be built. The build order will be set automatically.
I suppose there is something similare in VC6.
|
|
|
|
|
But I could find one for VS 6.0 (VC++ projects - this i forget to mention above). Can any one help me if there is any similar settings for VS 6.0.
-
Thanks in advance
Nandu
|
|
|
|
|
Cedric Moonen wrote: I suppose there is something similare in VC6.
Yes, and the menu items to get there sound identical (where most other things have been moved and/or renamed).
"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
|
|
|
|
|
Nandu_77b wrote: I have a workspace in VS 6.0. This workspace contains 10 projects, each project depends one or other. Since one project is dependant of other, the projects should be built in an order, so that a particular project will get built only after building its dependencies. This will avoid the build error (lib file not found/open or like link error).
Goto Project->Dependencies
The combo that you see shows a project and the list box contains entries for other projects.
Select all the projects on which the one in the combo is dependent. That's all. Select next project and proceed as with the previous one.
|
|
|
|