.net - Compile time errors while working with C++/CLI examples -


i trying read string 'number' file, , convert integer. following code, c++/cli

int informationreader::getthreshold() {     streamreader ^reader = gcnew streamreader("threshold.dat");     system::string ^thresholdstr = reader->readline();      int32 thresholdnum;      boolean = int32::tryparse(thresholdstr,thresholdnum);      return 0;  } 

but, code executed, following error

1>informationreader.cpp(29): error c2065: 'int32' : undeclared identifier 1>informationreader.cpp(29): error c2146: syntax error : missing ';' before identifier 'thresholdnum' 1>informationreader.cpp(29): error c2065: 'thresholdnum' : undeclared identifier 1>informationreader.cpp(31): error c2065: 'boolean' : undeclared identifier 1>informationreader.cpp(31): error c2146: syntax error : missing ';' before identifier 'a' 1>informationreader.cpp(31): error c2065: 'a' : undeclared identifier 1>informationreader.cpp(31): error c2653: 'int32' : not class or namespace name 1>informationreader.cpp(31): error c2065: 'thresholdnum' : undeclared identifier 1>informationreader.cpp(31): error c3861: 'tryparse': identifier not found 

ok alien me, because went through number of questions , answers, , in of them have followed similar approach have used getting error. why this? please help.

fix first compilation error see: need system:: in front of int32 thresholdnum;


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -