|
.IsDots() member function give true if they are DOTS...
A Programmer Never Dies..***
|
|
|
|
|
You must be saving the result in an array or a buffer. Just omit the first two elements when retrieveing the array.
JJ
|
|
|
|
|
Hi
i am trying to read an integer given as a command line argument to my program, but i can only get it as a string, that is argv[1], how can i get it as an integer ?
tahnks
|
|
|
|
|
|
I have the following code:
CString str("112");
int n = atoi((LPCTSTR) str);
This code works fine under VC++ 6.0, but under eVC++ 3.0 (UNICODE) the code doesn't compile, because the function atoi doesn't support UNICODE.
How can I write the function (convert a CString to a integer and float) so that it works with and without UNICODE?
I need to functions... one to convert a CString to a float and one to convert a CString to a integer!
|
|
|
|
|
use _ttoi which is the TCHAR version
int n = _ttoi((LPCTSTR) str);
|
|
|
|
|
And what kind of function is to convert a string (CString) to a float?
|
|
|
|
|
Like any of the A functions atoi() never ever supports unicode (same goes for itoa()). Use either _wtoi or _ttoi.
Anonymous wrote:
How can I write the function (convert a CString to a integer and float) so that it works with and without UNICODE?
int whatever = _ttoi((LPCTSTR)str);
or, if you want explicit support
if(bUnicode)
whatever = _wtoi((LPCWSTR)str);
else
whatever = atoi((LPCSTR)str);
...if you're under 8 or younger. Chris Maunder, the Lounge
|
|
|
|
|
Hello,
I have a dumb question.. I have an app that runs perfectly fine in Debug mode.. no problems what so ever, but when I try to run it in release build it errors when I first fire it up with a "The instruction at "0x0040cf93" referenced memory at "0x0010ab000". The memory could not be "read"." How does someone go about finding out why this is happening only in the release build?? Kinda weird.
Thanks!
Rob
|
|
|
|
|
Never mind I had a build setting out of wack..
Thanks anyway
|
|
|
|
|
Hello
Anyone knows how we can change the current XP theme via code?
I am looking for a reverse version of GetCurrentThemeName.
Or is it enough to modify the registry (assuming thats where the data is
stored) and then send a WM_SETTINGCHANGE to all top level windows?
Regards and thanks,
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
|
Hi how are you,
Do you know how I could plot some histograms in C++.
This whole thing should look something like that:
"There are 4 values for each #
Histogram starts at 10.000 with a step size of 5.000.
10.000 : ########
15.000 : #############
20.000 : #######
25.000 : #########################
30.000 : ###############
There are 15 inputs not in the range 10 to 35.
Can you tell me how I could proceed to plot a histogram in C++ like this. It should involve
• A function to read the input values and keep the count in an array.
• A function to obtain the maximum value in a given array.
• A function to calculate an integer division, but with rounding up.
• A function to plot the histogram.
• The main function to drive the whole program.
If you have any suggestions or some good links to any website that might concentrate on histograms, would be of great
help for me.
Thanks
|
|
|
|
|
Go to http://root.cern.ch
and download the Root package. This includes an C++ Interpreter and many visualization
classes in C++. Including 1,2,3-D Histograms, Fitting algorithms 3D-Functions and much more.
e.g The C++ Script: http://root.cern.ch/root/html/examples/hsum.C.html
produces this Histogram
http://root.cern.ch/root/html/examples/gif/hsum.gif
Hope this helps.
Yours,
Alois Kraus
|
|
|
|
|
This sounds too much like a school assigment, please start writing code, and we'll be really happy to help you with specific questions!
I may sound harsh, but that's the way it is. but I will give you a hint, not a programming one, but a generic one :
When facing a problem like this, first, start by figuring out how you'd do this manually, write things down using real words and you find that the answer is really simple and that "translating" it to any programming language is easy!.
Max.
|
|
|
|
|
Go see your professor or your teaching assistant.
|
|
|
|
|
Hi there,
Would anyone happen to know how I could go about sending an email + attachment using the user's default mail program, such as Outlook Express? Well, really all I need is to pop up the Outlook Express mail composition with stuff like body text, subject, and email attachment already filled in. (The email attachment is the hard part, as the other stuff can just be put into a mailto tag.)
Any ideas?
Much thanks!
swine
Check out Aephid Photokeeper, the powerful digital
photo album solution at www.aephid.com.
|
|
|
|
|
|
Thanks! Actually I just stumbled upon this a couple of minutes ago and was able to send out an email using MAPI. The problem is that the user still has no access to their address book from which they can pick email names.
What I would really need to do is pop up the email composition window of the default email program. Is this possible through mapi?
Thanks!
swine
Check out Aephid Photokeeper, the powerful digital
photo album solution at www.aephid.com.
|
|
|
|
|
Ooops nevermind, I found the MAPI_DIALOG flag .
cheers!
Check out Aephid Photokeeper, the powerful digital
photo album solution at www.aephid.com.
|
|
|
|
|
MAPI works nicely.
Shog9
------
If you really what to get shitfacde tell a crowded bar that is is yourt borthday and hife your wallet. you ka will many more friends.
- David Wulff, Brithday selebrations, 9/19/02
|
|
|
|
|
Thanks! Actually I just stumbled upon this a couple of minutes ago and was able to send out an email using MAPI. The problem is that the user still has no access to their address book from which they can pick email names.
What I would really need to do is pop up the email composition window of the default email program. Is this possible through mapi?
Thanks!
swine
Check out Aephid Photokeeper, the powerful digital
photo album solution at www.aephid.com.
|
|
|
|
|
Ooops nevermind, I found the MAPI_DIALOG flag .
cheers!
Check out Aephid Photokeeper, the powerful digital
photo album solution at www.aephid.com.
|
|
|
|
|
if i hava a class
class a
{
int a;
CString str;
};
i want to write its object into a file and send that file through a network to different computer and i want to recive that object again if i have the same class there.
may i read the same object on network from a file?
any body can explain my idea into code like
how to write object into file ?
how to read object on the network (having same class there) from file ?
r00d0034@yahoo.com
|
|
|
|
|
See Serialize (u must thus derive ur class from CObject)
archives and using archives with sockets!
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|