c++ - Dll Plug-in basic questions -
for last couple of days i've been learning c++ make dll plug-in program.
my objective data(the flight plan's more precise) program , on first phase save them text file(second phase connect them python it's that). in header file imported file many classes , many functions(which given plugin development guide). class i'm interested in class caircraftflightplan , has functions inside this:
bool isreceived(void) const; //----------------------------------------------------------------- // return : // true - if kind of fl received servers // false - else //----------------------------------------------------------------- const char * getorigin ( void ) const ; //----------------------------------------------------------------- // return : // origin airport. //----------------------------------------------------------------- int getfinalaltitude ( void ) const ; //----------------------------------------------------------------- // return : // final requested altitude. //-----------------------------------------------------------------
i have many doubts this, hope can help:
1-what mean having "nameoffuction"(void) const? receives nothing?how call these functions then
2-i not understand function "const char * getorigin ( void ) const ;",what want, const or char?
3-the comments below functions tell return or that. how return if function empty, it's "int getfinalaltitude(void) const"...
4-in source file, try call 1 of functions write txt file,how can this:
int airplane; ofstream textfile; textfile.open("fp.txt"); textfile<<int gettrueairspeed("mah545"); //i know there's error here, how solve it? textfile.close();
i'm sorry asking these (noob suppose) questions way specific search answer online(i tried already)
thank help
yes, takes no arguments call so:
nameoffunction()
this takes no arguments called
getorigin()
. returns pointerconst char
.as above, functions take no arguments return values.
delete
int
in front of function call. should rid of @ least 1 error.textfile<< gettrueairspeed("mah545");
Comments
Post a Comment