I started with a long header file and a long source file (the inherited project, and go to my work The wish was as soon as possible). Now it was "finished" and I decided to split it for ordering (if I needed to update it in the future, make it more manageable).
I separated it in stages, and all went well, one point is getting the error of C2146 (which basically says that the type is not specified) error.
Before I was in the following situation:
MyAlg.h
#pragma once #include & lt; String & gt; Namespace std; Struct AlgParam {int param1; Int param2;}; Invalid ParsParamFile (AlgParams & params, string & file_name);
The function Parseparam file
was defined in MyAlg.cpp
. Main project files
MyApp.h
# "MyAlg.h" Include # & lt; String & gt; Std using namespace; Struct AppParams {string inputFileName; String paramFileName; AlgParams AlgPrm; // Note that the global parameter is straight;) / / include an AlgParam
my App.cpp
# "MyApp.h" RunMyAlg (SomeClass & Data, Algraphs & Parameters) {--- bla bla bla} void ParseCommandLine (char * argv, AppParams and params) {--- bla bla bla} int main (int argc, char * argv) {App Parameters Parameter; Parse Commendline (RGR, Parameters); Parse paragraph (params, params.php filename); //// Code for creating and loading some algorithm data //// RunMyAlg (data, params.AlgPrm); Return success; }
I then moved the definition of MyAlg.cpp
from RunMyAlg
(and MyAlg.h
). Since then it will not be compiled, give me
error C2146: syntax error: missing ';' Before the identifier 'Algroups' in the relevant line of MyApp.h
What could be causing this? Is there a way to get a compilation order visual studio express report?
Thanks
Comments
Post a Comment