Home > Back-end >  VS2019 under Windows into ubuntu16.04,
VS2019 under Windows into ubuntu16.04,

Time:11-24

# pragma once

#include
#include


Struct the Args {
Int serialNumber;
STD: : optional UseMulticast;
};

Struct ArgParseResults {
Bool success;
STD: : string errorMessage;
The Args Args.
};

ArgParseResults parseArgs (int arg c, char * * argv);
This is a header file, display an error
./vc - using - framestream/args. H: o: error: "optional" in the namespace "STD 'does not name a template type
STD: : optional UseMulticast;
Don't know how to deal with, I use the makefile, STD=c + + 17, thank you very much!!!!!

CodePudding user response:

The # include & lt; Boost/optional. Hpp> Is amended as: # include & lt; Optional>

CodePudding user response:

Don't you boost the include an error?

CodePudding user response:

No error, this header file without error

CodePudding user response:

Originally is # include< program; Optional> , proceedings of the optional didn't find the file, then I only change to # include

CodePudding user response:

reference 4 floor workerinChina response:
program had been # include , proceedings of the optional didn't find the file, then I only change to # include
should be on both sides of the boost version is not the same