|
Sveta80 wrote:
My program works but it does not give me the outcome I am looking for.
So how does it work if it does not give you the outcome you are looking for?
Sveta80 wrote:
while(inputVal != -1.1)
This condition may never evaluate to true. It's best not to test floating-point numbers for equality to a constant value. A better solution would be something like:
while (inputVal > 0.0)
...
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
If you read through the program you will see that I can not use
while (input > 0.0)
because you will get an infinite loop. How would my program will end the user's input from the keyboard?!
A line of code
while (inputVal != -1.1)
is keeping track of when the user is finished to enter numbers.
|
|
|
|
|
double number;
while(cin >> number)
{
cout << number << endl;
}
Any input that is no number will terminate this loop.
We can do no great things, only small things with great love. - Mother Theresa
|
|
|
|
|
Infinite loops are very easy to work around. Trying to do something with floating-point numbers that they were not designed to do is a lot more critical.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hi. How can i include an image on top of a dialog? Thanks.
|
|
|
|
|
Hi,
you could add a CStatic control to your dialog.
For more details click here.
Regards
Achim Klein
We can do no great things, only small things with great love. - Mother Theresa
|
|
|
|
|
There is a special picture control you can add just like a static control.
Don't try it, just do it!
|
|
|
|
|
I am using the Win32 API to create an application to assist in making a custom .font file format for a game I am making. It is a SDI application. Although my question may seem simple, I was unable to find anyway of doing it, or maybe searching for the wrong thing, I don't know. Anyway, I want to be able to programatically change the size of the window, at run time. I have a title bar, menu, and borders, and I don't want to have them included when resizing. By that I mean, for example, I wanted to resize the window to 500 pixels by 500 pixels, the white space in between (not including) the menu and borders would be 500 pixels by 500 pixels. Also, I want to disable the user from resizing the application. Anyone have any ideas?
Thank you
-Dev578
|
|
|
|
|
|
can someone help me in finding source codes for a webserver in visual c++..please i have been searchin for that on net for a long time but no success..if someone can find out that for me i shall be extremely grateful..
my emailid is as follows:
spiderman_13@rediffmail.com
thanx in advance..
May God bless all of u..
bye.take care
hi guys i am spiderman
|
|
|
|
|
|
What if you need to search for files that attach themselves on other file (just like what virus does), will CRC do you something good or you need to do something else?
|
|
|
|
|
Hi,
check it out with this nice PJ Arends project.
Regards
Achim Klein
We can do no great things, only small things with great love. - Mother Theresa
|
|
|
|
|
If you want to create linda virus scanner it does not!
You can only check if a file has changed since the last scan, but not if one file is able to change another one!
Don't try it, just do it!
|
|
|
|
|
Does the file searcher in windows' start menu uses CRC? My guess is it doesn't. It only uses FindFirstFile.
|
|
|
|
|
Hi,
This question is going to make me sound really dumb, but here goes: What is the easiest way to create and IStream from on a file with a given path?
Joel Holdsworth
|
|
|
|
|
If using MFC - you can try CArchiveStream declared in afxpriv2.h (create CFile, create CArchive on it and then CArchiveStream). But the implementation is not full. One of the major methods, Stat , is not implemented.
Otherwise, AFAIK, you have to implement it manually...
BTW, the question is very interesting. If anyone knows whether a system contains a ready-to-use function that returns IStream* on a file path, please tell!
One always gets the deserved.
|
|
|
|
|
|
Hi,
I want to do performance test using Rational Test Manager.
My application under test uses CORBA for remote calls.
I can not record any script.
Should I install some specific DLLs to record CORBA calls?
If yes where can I find these DLLs?
Thanks very much.
The best regards.
|
|
|
|
|
Dear Members
my problem is capturing image from webcam and send it to the remote system.Now i capture the image using Windows Multimedia API.But i dont have a idea about how to send it to network.please give tips.
By
S.Arul Joseph
|
|
|
|
|
Arul Joseph wrote:
But i dont have a idea about how to send it to network.please give tips.
Try this Link :-
http://www.codeproject.com/internet/videochat.asp[^]
"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
|
|
|
|
|
You can also send it via RTP. There are libraries on the net that may help you.
Don't try it, just do it!
|
|
|
|
|
i want to capture the driver of my webcam using vc++.how can i do that.waiting for reply.
|
|
|
|
|
|
hello,
Is there any class in MFC or any custom made class using MFC, which i can use to write and read from my USB HID Device. (Important: Read and Write Report should be fail safe).
Thanks
|
|
|
|