c++ - Error with type declaration -


I get an error "This announcement has no storage class or type specifier." I have checked for semicolons and I have included the relevant libraries.

  #include & lt; Iostream & gt; # Include & lt; Fstream & gt; using namespace std; Const int n = 8; Double p [n] = {1.23, .97, .86, .77, .69, .65, .71, .50}; Double pi [n] = {.74, .70, .66, .68, .65, .62, .60, .54}; Double jade [n] = {.25, .35, .45, .55, .65, .75, .85, .95}; Offream mimefile; Myfile.open ("ppilow.txt"); Try to replace // error here  

myfile.open (" Ppilow.txt "); with the following code:

  int main (int argc, char * argv []) {myfile.open ("ppilow.txt"); Return 0; }  

Explanation: You can not keep instructions outside the body of actions.

But better to avoid the declaration of global variables, so I advise you to go to this also in the body.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

How to access user directory in lazarus? -

java - Gradle dependencies: compile project by relative path -