|
Thanks its done.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
CString str( _T( "10000" ));
int n = _ttoi( str );
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
As you seem strugling with Unicode and non-unicode, I suggest you read thie excellent article[^]. Things will be much more clear afterwards and it is a must read for everybody that starts working with unicode.
|
|
|
|
|
"_$h@nky_" wrote: atoi() not working properly
Unfair: atoi does its job carefully.
"_$h@nky_" wrote: please tell me where i m wrong.
Much more realistic.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: "_$h@nky_" wrote:
please tell me where i m wrong.
Much more realistic.
One should perhaps ask the question whether the name of the function could be an abbreviation for AnsiToInteger or UnicodeToInteger; or possibly wAideToInteger...
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Roger Stoltz wrote: One should perhaps ask the question whether the name of the function could be an abbreviation for AnsiToInteger or UnicodeToInteger; or possibly wAideToInteger...
A verage T ime O n I ce, I suppose [^]
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: "_$h@nky_" wrote:
atoi() not working properly
Unfair: atoi does its job carefully.
I don't see any "unfearness": if you don' decontextualize, "in the context it was placed atoi doesn't work properly". That's the reason why it should not be used in that context... and hence who used it was wrong.
The fact is that atoi does not understand unicode.
They're simple two different ways to tell the same thing.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
"I'm trying to boil some water, and this screwdriver is useless. Bloody screwdriver"
"That's unfair - screwdrivers are not meant for that - try a kettle instead".
"I don't see any unfairness in that. In the context it was placed screwdriver doesn't work properly."
I now return you to normal service.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
You're right in your context, but I don't see any "bloody atoi" in the original post... And if you remove it, even you post becomes fair:
"I'm trying to boil some water, and this screwdriver (the only thing I know) is useless. Is there any other tool?".
It's not fair or unfair. It is just a fact.
The author itself asks "where am I wrong" so...
anyway, it seems to me that the distance between a screwdriver and a kettle is far more than the one between atoi and _wtoi ...
But may be i misunderstood the meaning of "unfair...".
You attribute it to screwdriver/atoi, I understood it was given to the author ("you'had been unfair")
|
|
|
|
|
"_$h@nky_" wrote: please tell me where i m wrong.
By using char and atoi() instead of wchar_t and _wtoi() .
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hello,
When i want compile bigger project like some win32 IRCD i must use additionally to mingw, sh.exe and make.exe to configure and compile.
But... everything works well except sh.exe and make.exe. When i run them there is no errors, no help, nothing. Before make.exe told that he lack some .dll, i found it and no more error but it gives nothing after run it.
Help
|
|
|
|
|
I haven't done any graphic programming before and I would appreciate it if you guys can point me in the right direction.
I'm gonna have 6 tiled images layed out 3x2. Each image will be 256x256 (tiled images will be 768x512), but my display screen is only 320x240.
What would be the best way to allow for a smooth panning of the entire layout of the 6 images?
|
|
|
|
|
Check this![^]
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Hi,
if a condition is met, my code inserts image into a column of database table. I used below code, passing the value of picture in code, this is giving me
"Must declare the scalar variable "@picbyte", i declared its value(code below).any idea why iam getting this error...
string filepath = "C:\\Users\\Prakash\\Pictures\\pic.jpg";
FileStream imgfile = new FileStream(filepath, FileMode.Open,FileAccess.Read, FileShare.Read);
byte[] picbyte = new byte[Convert.ToInt32(imgfile.Length)];
imgfile.Read(picbyte, 0, System.Convert.ToInt32(imgfile.Length));
SqlCommand cmd3 = new SqlCommand("Insert into " +Label7.Text+"(Picture)"+ " values(@picbyte)",con);
cmd3.Parameters.Add("@Picture",System.Data.SqlDbType.Image);
cmd3.Parameters["@Picture"].Value=picbyte;
cmd3.ExecuteNonQuery();
thanks in advance
modified on Tuesday, January 13, 2009 4:49 PM
|
|
|
|
|
First do you know I cant see errors on your monitor and second it seems you use of Managed C++/CLI so you need to ask on the Managed C++/CLI[^].
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hi,
iam getting "Must declare the scalar variable "@picbyte" error.... and i supplied the value in my code..
cmd3.Parameters["@Picture"].Value=picbyte;
this is a sql code used to insert an image into database for a specific condition, which i'll retrieve in gridview..
i neednot pass the value dynamically so iam passing the value in code itself..
why iam getting this error even though i passed the value...
thanks
|
|
|
|
|
Did you even READ Hamid's response? YOU ARE ON THE WRONG FORUM.
"Well, we're getting "F"'d at work. WPF, WCF, and WWF... WTF?" --John Simmons
|
|
|
|
|
How program identify negative number from input while I entering negative number?
such as:
if number==negative
do
{something;
}
else
do
{
something else;
}
Please Help me out.
|
|
|
|
|
Like this:
...,4,3,2,1,0...-1,-2,-3,-4,-5,....
if number>0
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hi,
I suggest you buy a book on the language of your choice and study it, that will avoid an avalanche of very basic questions and answers.
|
|
|
|
|
Do you know any good book or I tend to go to a book store, look at say 10 similar books[^],...?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Searching one is more fun than finding one, I am not going to spoil it for you.
|
|
|
|
|
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
MZonaid wrote: if number==negative
How about:
if number < 0
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hey: don't tell the secret!
This way everyone will realize programming is a simple task (and will qualify himself as 'Senior Developer').
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|