|
short sVar;
sVar = sVar * ( short )0.5;
|
|
|
|
|
if you do not want to get zero all the time, use sVar=(short)(sVar*0.5);
but I prefer sVar=sVar/2;
|
|
|
|
|
Luc Pattyn wrote: but I prefer sVar=sVar/2;
Or:
sVar /= 2;
---
single minded; short sighted; long gone;
|
|
|
|
|
or sVar>>=1; Why make it obvious...
-- modified at 15:48 Thursday 17th May, 2007 because I owns
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Ummm... wouldn't that divide by four?
|
|
|
|
|
Yeah
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Thanx Mike
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
HI:
I have made an application which creates instances of word application locally and it is working fine but when i try to create intance of word application it gives me this error
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005
Anybody knows the answer.
Thanx
|
|
|
|
|
Farhan Ali wrote:
I have made an application which creates instances of word application locally and it is working fine but when i try to create intance of word application it gives me this error
What do you mean, locally?
I think this error can happen when you dont have appropriate permissions, or maybe Word is not installed at all?
Take a look at Control Panels -> Administration tool -> Component Services -> dunno somewhere you should find settings for Word DCOM model. Good luck.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Hi friends..
string str="ABC";
this means that we are assigning value to the object str of string class..right?But whn we are instantiating some class then we are assigning values to the feilds of that class(ex:Employee_1.Name="xyz",Employee_1.Id=1234,etc where Employee_1 is an object of class Employee)..thn how things are working differently for string class..I think this has to do something with user defined and predefined reference data types..
-- modified at 2:52 Wednesday 16th May, 2007
|
|
|
|
|
Rahul83 wrote: working differently
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
how..i u know plz let me knw
|
|
|
|
|
hi all,
I am developing an application, in that I want to convert a dbx file to a text file. (or I want to extract some data from that)
anybody plz suggest a solution????
Is there s any algorithms or components are available that meet my requirements????
thanking you in advance
jaz
|
|
|
|
|
What is a dbx file ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi,
thanks for ur interest
The outlook / outlook express files(folders) are stored as an *.DBX file (eg:- Inbox.DBX, Outbox.DBX)...
I want extract datas from these files ..
ie, To,CC,BCC,From,Subject,Message ... fields...
How can u do that any idea?? (Can u refer me any components or algorithms to do that ??)
Thanks
jaz
|
|
|
|
|
Try this[^]
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
str variable has the memory address of the location where "rahul" is stored.
The value assigned to a string variable is stored in the heap, and its address is stored in the stack.
|
|
|
|
|
This is not C. You're creating an instance of a class, which then contains the value "rahul". If you create a byte array, you can create the same effect as a char * in C, where you're storing the values themselves. Of course, .NET can move your objects in memory, so you'd have to pin the memory before being sure the string will stay in the same location.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
The most idiotic and selfish thing to do in these forums is to delete your question after getting the answer!!
This's a good reason why we have to quote at least part of the question!!
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
I donno..this is the first time i became member of this forum..i thought it
should be deleted..
|
|
|
|
|
Welcome aboard Rahul!
Please familiarize your self with cp rules.
Here are some:
- No CAPS!!
- No URGENTs
- No Question post deletion
- No inter-forum posting
- No post repetition
Have a good time
oh, one more rule..
- If someone answered your question, give them 5, so people with the same inquiry could easily find the correct answer among the replies, and to help these people how helps us on their way up to be MVPs here in the cp.
Cheers
-- modified at 3:36 Wednesday 16th May, 2007
-- modified at 3:39 Wednesday 16th May, 2007
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
hey..
i am currently working on a C#/openGL drawing application.....drawing is great but I need to incorporate functionality to select and edit lines with the help of mouse...plz suggest good tutorials from your expereince
cheers
|
|
|
|
|
Because a line is not an object, you will have to write your selection process from the ground up. You will have to register the points contained by lines (perhaps recognizing members from end points for instance); detect clicks or other process you might provide for selecting lines; and then perhaps re-draw the line/polygon/etc... to indicate it has been selected. A process you might use to select graphic elements could be to iterate through a list of the elements your processes have drawn, re-drawing each to indicate selection as the list is iterated by arrow keys, navigation buttons, or whatever.
|
|
|
|
|
Hello everyone,
I need to add the option of uploading image into a remote database server to my Windows Application. I have been reading about it and it appears there are different ways to approach this. So far two of the ways that I find intresting are:
1- save the image in the database as type BLOB.
2- upload the file, save it to disk, but store the filename in the database.
I was wondering if for option 2 I have to create a new Ftp instance and then FTP the file to the remote server?!!!
Any ways, I have no clue what so ever and any information regarding uploading images from a Windows Application will be appriciated.
Thank you very much and have a great day.
Khoramdin
|
|
|
|