www.digitalmars.com         C & C++   DMDScript  

D - toInt() problem

reply kinghajj <kinghajj_member pathlink.com> writes:
code:
int ivar = toInt(var);

var is (in this case) "0".

the error I get is "Error: Error: conversion 0"

what's the problem?
Jan 08 2004
parent reply "Phill" <phill pacific.net.au> writes:
I use this

import std.string;
atoi("0")

Phill


"kinghajj" <kinghajj_member pathlink.com> wrote in message
news:btl5u3$1oeq$1 digitaldaemon.com...
 code:
 int ivar = toInt(var);

 var is (in this case) "0".

 the error I get is "Error: Error: conversion 0"

 what's the problem?

Jan 08 2004
parent reply kinghajj <kinghajj_member pathlink.com> writes:
I still get the same error :(

In article <btlcs2$2310$1 digitaldaemon.com>, Phill says...
I use this

import std.string;
atoi("0")

Phill


"kinghajj" <kinghajj_member pathlink.com> wrote in message
news:btl5u3$1oeq$1 digitaldaemon.com...
 code:
 int ivar = toInt(var);

 var is (in this case) "0".

 the error I get is "Error: Error: conversion 0"

 what's the problem?


Jan 08 2004
parent reply J Anderson <REMOVEanderson badmama.com.au> writes:
kinghajj wrote:

I still get the same error :(

  

In article <btlcs2$2310$1 digitaldaemon.com>, Phill says...
  

I use this

import std.string;
atoi("0")

Phill


"kinghajj" <kinghajj_member pathlink.com> wrote in message
news:btl5u3$1oeq$1 digitaldaemon.com...
    

code:
int ivar = toInt(var);

var is (in this case) "0".

the error I get is "Error: Error: conversion 0"

what's the problem?


      



Jan 09 2004
parent kinghajj <kinghajj_member pathlink.com> writes:
nevermind. I fixed it. Thx for your help.
Jan 09 2004