#78 Comparing string from array with string fails

compiler
closed-fixed
NBC (24)
5
2010-01-04
2009-12-28
Anonymous
No

This always fails:

string name[]= {"Beethoven","Bach","Mozart"};
...
if(name[0]=="Beethoven") ...

whereas this works:

string name[]= {"Beethoven","Bach","Mozart"};
...
n=name[0];
if(n=="Beethoven") ...

Discussion

  • John Hansen

    John Hansen - 2010-01-04

    A fix for this defect has been checked into SVN and will be included in the next official release.

     
  • John Hansen

    John Hansen - 2010-01-04
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks