|
ÓÃÖÐÎĶàºÃ£¬Ó¢ÎÄ¿´²»¶®£¡;P
|
|
|
|
|
Yeah....that's probably not going to compile.
When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?"
-Hockey on being a geek
|
|
|
|
|
heres my problem
float r=10.3;
int x=10;
int z=ceil(r*x) gives me 104 . I need 103
I need output to be converted as
if product = 103.1 o/p = 104
if product = 103.0 o/p=104
if product = 103.5 o/p = 104
Basically i dont want it to take the upper no if the product can be equivalently represented by an integer
what i mean is 103.0 is actually 103
but 103.1 isnt 103
|
|
|
|
|
Hi
double r=10.3;
int x=10;
int z= ::ceil(r*x);
will give 103
Chill
The chosen One
|
|
|
|
|
<code>float x = 3.01; x = ((int)x< ceil (x) )?(int)x:(int)x+1; </code>
a rough try
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
It's most likely round off error.
internally it figures that it is 103.0000000000001 and so it rounds up to 104. Look into the IEEE format used to store floats to figure out why.
J.
----------------------------
|
|
|
|
|
hi all,
i have an XML file..where i have some data as
<keywords>
<keyword>.net
<keyword>0% credit card
<keyword>0% interest credit card
<keyword>1 800 contacts
<keyword>1 800 flower
<keyword>1-800 flower
<keyword>1-800-flowers
I want to perform a search over this XML file as if i have "1-800-flowers". I dont want it to go thru each element and then reach there..it is a slow process as it goes in loop for each keyword tag..is there any way where i can perform a fast search for the data i have..so that it is fast..i am using VC++ with MSXML..Please help me out..
Thanks a lot in advance..
regards,
Himanshu
|
|
|
|
|
net
0% credit card
0% interest credit card
1 800 contacts
1 800 flower
1-800 flower
1-800-flowers
all this is the data embedded between tags that have the same name
like
<MYTAG>1 800 blah 1 </MYTAG>
<MYTAG>1 800 blah 2 </MYTAG>
<MYTAG>1 800 blah 3 </MYTAG>
<MYTAG>1 800 blah 4</MYTAG>
Then I am afraid u ll have to go thru each node and find out . if the tags are unique u can do a "getElementsByTagName" defined by DOM .
Engineering is the effort !
|
|
|
|
|
hi,
post proper XML u r using to get soln or or look into XPath query language on MSDN.
The chosen One
|
|
|
|
|
You could use XPath (Xalan). Not sure how compatible it is with MSXML. I use Xerces to parse XML.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Here is a sentence:
using namespace std
Could you tell me what is its meaning?
|
|
|
|
|
Hi,
"using namespace std;" means in ur program u r using namespace called as "std" provided by microsoft. all STL functionality u will get under this namespace.
Why we use namespaces? To avoid name collision.
Compiler tries to interpret objects or function calls user namespace if specified else searches in global namespace by default.
More info is given in MSDN.
The chosen One
|
|
|
|
|
Oh,I see
Thank you
In fact, I haven't found the result from MSDN as to using namespace std
Thank you again
|
|
|
|
|
shalala wrote:
In fact, I haven't found the result from MSDN as to using namespace std
Try here:
http://msdn.microsoft.com/library/en-us/vclang98/html/_pluslang_using_declaration.asp?frame=true
http://msdn.microsoft.com/library/en-us/vclang98/html/_pluslang_using_directive.asp?frame=true
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
|
These three ways can work well for multi-Threaded design.
They must be some differnt in some aspects although They look very alike.
Could you tell me the differnt between them, please!
Thanks in advance!
|
|
|
|
|
Hi,
type "synchronization [Win32]" in MSDN u will get it what u want.
The chosen One
|
|
|
|
|
Mutexes and Critical Sections are logically the same, but critical sections are cheaper/faster in exchange for only working within the same process.
Semaphores are counters, they have a value that can be incremented and decremented.
--
-Blake (com/bcdev/blake)
|
|
|
|
|
Now I know about them to some extent.
Thank you!
|
|
|
|
|
Hello, everyone!
Atfer opened several MS-Word applications, I want to get all the process IDs of them. The MS-Word applications are not invokeded by my VC application but invoked by some other applications on the same machine.
Can anyone show me a simple example on how to do it?
Thanks in advance,
Geo
|
|
|
|
|
I m feeling a bit stupid cause I ve got some trouble trying to make an item disabled in my menubar. I ve created my menu bar and now I m trying to attached it to a Cmenu object.And after I use a member function to change properties in this menu bar. I don t know whether this is the good method and moreover it seems that it doesn t work.
I m sure I just need one or two lines to do this.
Thanks
sysy
|
|
|
|
|
Have you switched off automatic menu updating?
Normally MFC apps use the CCmdUI related stuff to do menu updating during idle time or when a menu is to be shown.
It might be that the default handling of this is undoing any changes you make.
Steve S
|
|
|
|
|
I have a Dialog app and in the dialog class , I create a CpropertySheet object using the Create function. I want to make the propertySheet unmovable. But at the same time I need it to be enabled ? what should i do ?
Engineering is the effort !
|
|
|
|
|
Hi,
Is it possible to do serialization in an MFC application(i'm doing a game),without needing to use the Document/View architecture?
The reason i ask is,the only way i could get my MFC game to use a fullscreen window(DX9)without any flickering,was to build it from an old DirectDraw example i found(from this site i think).
The problem is,that this example doesn't use the Doc/View architecture,and all of the D3D setup is done in CMainFrame.
I've been trying for a few days now,to get it working in a AppName::View,but i'm having difficulties in doing it.
Is this possible? and could anyone point me in the direction of an example or tutorial please.
Thanks
Paul.
|
|
|
|
|
Just construct a CArchive on top of a CFile.
|
|
|
|