|
double GetInvestmentAmount()
{
Console::Write(L"How much money do you want to invest? ");
String^ input = Console::ReadLine();
double amount = \\ i want to convert the 'input 'into the double type
return amount;
}
how can I convert the " String ^ input" into the double type. Thanks in advance.
I've tried "safe_cast<double>(Console::ReadLine())" and " Covert.ToDouble(*input)" but it just doesn't work ==
|
|
|
|
|
use atof()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
anshu, don't encourage bad post by answering them, please
there are enough of them these days, and especially today !
|
|
|
|
|
|
But he gave the OP an unmanaged solution!
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
i saw that, but i'm assuming the OP is dumb enough not to be aware of it, so, capable of trying it, and spam the board with some "i don't understand, i doesn't work, please help, it's urgent, help meeeeeeeeeeee"
get me ?
|
|
|
|
|
toxcct wrote: and spam the board with some "i don't understand, i doesn't work, please help, it's urgent, help meeeeeeeeeeee"
I see the problem. But a crazy interop solution of some kind would be fun (not for me, for the
OP)
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
this code has nothing to do on an unmanaged forum...
ask the C++/CLI forum[^] please
|
|
|
|
|
|
double GetInvestmentAmount()
{
Console::Write(L"How much money do you want to invest? ");
String^ input = Console::ReadLine();
double amount = System::Convert::ToDouble(input);
return amount;
}
Now don't post managed c++ questions on the unmanaged C++ board or you will be tarred and
feathered!
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
|
|
Hi,
I want to define preprocessor constants in command line.
In source it would be something like this:
#define STR_SOMETHING "something"
Now how can I get the same result in command line using /D?
I tried in VS 2005, in Project Property Pages->Configuration Properties-> C/C++->Preprocessor-> Preprocessor Definitions…
Adding STR_SOMETHING=”something” doesn’t work. In Command line it looks like this:
/D "SOMETHING="something"".
The problem is with "".
Any idea how to do this?
|
|
|
|
|
forget what i said...
-- modified at 8:02 Monday 7th May, 2007
|
|
|
|
|
Are you sure? On my system (VS 2003) It doesn't work. Moreover (excerpt from MSDN):
"With one exception, defining symbols and constants with this option has the same effect as using a #define preprocessor directive at the beginning of your source file. If you use /D, quotes on the command line will be stripped whereas they are retained in a #define statement."
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.
|
|
|
|
|
when string starts with digits, it try to parse it to number
when with charackter... identyfier
|
|
|
|
|
HI
I HANE A PROBLEM IN CONNECTION OF MYSQL TO VC++(MFC)
LINK : fatal error LNK1104: cannot open file "C:\Program.obj"
Error executing link.exe.
PLEASE GIVE ME A HINT
THANKS
hi
|
|
|
|
|
NO NEED TO SHOUT !
and isn't the error message descriptive enough ?
the linker says he doesn't find the file C:\Program.obj...
does your compiler really generate this file ?
don't you have a problem of path name ?
see both your compiler and linker settings to find which one is badly configurated
|
|
|
|
|
toxcct wrote: the linker says he doesn't find the file C:\Program.obj...
How did you know the gender of his linker?
"The difficulty lies, not in the new ideas, but in escaping from the old ones."
-- John Maynard Keyes, 1936
|
|
|
|
|
he's a friend of mine... lol
|
|
|
|
|
I HAVE GIVEN THE PATH IN PROJECT ->SETTING->LINK ->OBJECT /LIBRARY MODULE AS
C:\Program Files\MySQL\MySQL Server 5.0\lib\opt
AND IN THE TOOLS ->OPTIONS->DIRECTORIES AS
C:\PROGRAM FILES\MYSQL\MYSQL SERVER 5.0\INCLUDE
NOW AM I WRONG SIR
PLEASE TELL ME
THANKS
hi
|
|
|
|
|
sorry, i can't read caps... please edit your message
|
|
|
|
|
I have the given path in project ->setting->link->object /library module as :
C:\Program Files\MySQL\MySQL Server 5.0\lib\opt
and in the tools ->options ->directories as :
C:\program files\mysql\mysql server 5.0\include
thanks
hi
|
|
|
|
|
What is this program.obj file ? Do you have a file that is called program.cpp (or .c) in your project ? It is strange that it is located in the root directory... Can you provide more informations about this file ?
It has probably nothing to do with mysql, you are probably doing something wrong with the settings.
|
|
|
|
|
thanks sir
i have a project.cpp file
sir where iam wrong in settings can i know this
hi
|
|
|
|