atoc

 

Description

Converts string to a complex

Syntax

complex atoc( LPCSTR lpcsz )

Parameters

lpcsz
[input]the string to convert

Return

a complex data

Examples

EX1

void atoc_ex1()
{
    complex     cc;
    string         str = "  2 + 1.35i";
    cc = atoc(str);    
    // Display the value:
    out_complex("value = ",cc);    // Result is "value = 2.000000+1.350000i"    
}

Remark

See Also

header to Include

origin.h

Reference